Name And Description Property Of OLEDB Source Components

Aug 24, 2006

I am adding two OLE DB Source components to my pipeline and giving them different names

(via the Sourcename variable) but like they are assuming default name and description i.e. OLE DB Source which is causing the following error message on opening the package that was generated.

The package contains two objects with the duplicate name of "component "OLE DB Source" (37)" and "component "OLE DB Source" (1)"

Here is how I am doing it, in the debugger the names in both instances seem to have set correctly based on the variable but when saved they are lost. What am I doing wrong here?

IDTSComponentMetaData90 source = dataFlowTask.ComponentMetaDataCollection.New();

source.Name = Sourcename;

source.ComponentClassID = "DTSAdapter.OleDbSource.1";

source.Description = Sourcename;

Thanks

View 1 Replies


ADVERTISEMENT

Source: Microsoft OLE DB Service Components Hresult: 0x80040154 Description: Class Not Registered. - MSAccess

Oct 31, 2007

Hello,

I am running Windows Server 2003 R2 Enterprise Edition SP 2

I have created an integration package in VS 2005 which extracts data from Access 2000 and imports it into a table on SQL server 2005 running on this server.

The package runs ok in Visual Studio 2005, but when i schedule it as a step in 2005 SQL Agent to execute as a SQL Server Integration package using SQL Agent Service Account it comes with the following error -
I did a bit of research which suggests this is due to SQL 64 bit and Windows 64b bit, however I am running 32 bit !! also the sql server agent is a domain admin user...can you gurus please help ?



Microsoft (R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 10:07:42 AM
Error: 2007-10-31 10:09:13.85
Code: 0xC0202009
Source: Copy all Data to Reporting Prod Connection manager "Access Allocations.mdb"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
End Error
Error: 2007-10-31 10:09:13.85
Code: 0xC020801C
Source: 5_Copy vw_Allocations 5_Access Allocations [1]
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Access Allocations.mdb" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
End Error
Error: 2007-10-31 10:09:13.85
Code: 0xC0047017
Source: 5_Copy vw_Allocations DTS.Pipeline
Description: component "5_Access Allocations" (1) failed validation and returned error code 0xC020801C.
End Error
Error: 2007-10-31 10:09:13.85
Code: 0xC004700C
Source: 5_Copy vw_Allocations DTS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2007-10-31 10:09:13.85
Code: 0xC0024107
Source: 5_Copy vw_Allocations
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 10:07:42 AM
Finished: 10:09:13 AM
Elapsed: 91.422 second


View 29 Replies View Related

How Can I Set Description Property By T-SQL ?

Jun 6, 2007

I would like to create table by T-SQLand need to specify DescriptionBut I can't find any sample to add Description property by T-SQL  Additionally, I also would like modify Description property by T-SQL. What can I do ?????  Please help me ...... 

View 2 Replies View Related

Setting Field Description Property...

May 19, 2008

I'm selectively migrating a load of data from one database to another and would like to be able to get & set a table fields Description property (as seen on the Design window under Column Properties) programmatically. I'm having a spot of bother in actually finding how to do it - anyone know?

Ta,

Rob


P.S. Just thought I'd mention - I do know about sp_addextendedproperty, and while I will use that if I have to, it would be nice to be able to use the existing column property Description so that when editing, the user can see the value.

View 2 Replies View Related

Setting The Column Property Description With A SQL Function Call

Feb 2, 2008

I am trying to figure out how to set the Description of a Column in my database table by making a SQL function call. I know that I can go into Microsoft Studio Express and type in each desciption for each column. I just have about 1000 variables and each variable's description is in an Excel spreadsheet. I want to be able to build SQL code that will set each of the 1000 variables own description.

Thanks for any help.

Wesley Marshall

View 4 Replies View Related

Error When An OLEDB Source Points To An OLEDB Destination.

Oct 10, 2006

Hi all,

I got an error when i do an OLE db Source pointing to an sql 2000 database and executing a sql query inside the OLE Source. The ole source will point to an OLE DB destination which is an sql 2005 database.

But i got the below error:

Error at Data Flow Task [OLE DB Destination [245]]: the column firstname cannot be processed because more than one code page (936 and 1252) are specified for it.

Error at Data Flow Task [DTS.Pipeline]: "component "OLE DB destination" (245)" failed validation and returned validation status "VS_ISBROKEN".

Error at Data Flow Task [DTS.Pipeline]: One or more component failed validation.

Error at Data Flow TaSK: There were errors during task validation.

(Microsoft.DataTransformationServices.VsIntegration)



View 5 Replies View Related

Custom Components - How To Evaluate A Property As An Expression?

Apr 11, 2008



Hi all,

I'm wondering if anyone's accomplished this before - I've been unable to find a whiff of info on how to do this so far.

I'm creating a custom component that I'd like to give a "Derived Column" type of ability to. By that, I mean I'd like to populate a property of my component with an expression (including references to input columns, package variables and functions) and be able to evaluate it at runtime - per row processed by the component.

I would also appreciate any information as to how to provide the interface to allow the user to build such an expression as well - is there a UI function in SSIS I can call to pop up the "expression builder"?


Thanks!

View 6 Replies View Related

XML TASK XSL Variable: Exception 'Property New Source Has No Source Xml Text'

Dec 20, 2005

Hi,
I want to transform an xml flow to an html flow. For this, I create an XmlDataDocument, I add on it, all that I want, and I store it in a file (in a dataflow task).
After that, in an xml task, I set the input properties like that:
Operation type: xslt
SourceType: File connection
Source: ras.xml
 
All works fine. But now, I want to use a variable to store my xml data. So, instead of storing my data in ras.xml, I store it in a variable like that:
 
Dim v As Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables90
Me.VariableDispenser.LockOneForWrite("RAS", v)
v("RAS").Value = doc.OuterXml
v.Unlock()
 
and in the xml task, I set configuration like that:
 
Operation type: xslt
SourceType: Variable
Source: user::RAS
 
But when I execute, I got this following exception:
 
Error: 0xC002F304 at Format HTML Mail, XML Task: An error occurred with the following error message: "Root element is missing.".
Error: 0xC002928F at Format HTML Mail, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string.
 
Furthermore, when I want to debug it, in replacing the xml task, by a script task, I can see that in my RAS variable, I get the xml data which is well formed.
 
<?xml version="1.0" encoding="UTF-8"?>
<root> €¦
</root>
 
(When I store it in a file, I can see it in IE)
 
Have you got an idea ?
 
 
 
 

View 3 Replies View Related

Problem Configuring Password Property For Oledb Connection.

Feb 17, 2006

I'm creating an xml configuration file to hold the connection string including the password (sql server authentication).  My package protection level is set to 'EncryptSensitiveWithPassword'.  I set up my connection manager and I check the 'Save my password' box. The  'Test connection' button reports that the connection is OK.  I enable the package configurations and I go through the Package Configuration Wizard and I specify 'xml configuration file' and I choose 'Specify configurations settings directly' and I specify a configuration file name with the same directory as the package.  I check the 'ConnectionString' property and the 'Password' property and then click 'Close'.  Then I save my package changes.  Now I look at the xml configuration file in a text editor and I see the Password property has an empty element:

<ConfiguredValue></ConfiguredValue>

Is it supposed to be empty?  When I right-click the package in solution explorer and pick 'Reload with upgrade' then I have to enter the password, but the validation fails with 'Acquire connection' error.  Should I just be saving the 'Connection string' property, or should I save all the connection elements (i.e. ServerName, UserName, Password etc.)?  If I edit the xml configuration file and I type the password into the <ConfiguredValue> element above, and then I do 'Reload with upgrade', then the 'Acquire connection' validation error goes away.  Could this mean that I am not able to encrypt the password?  Thanks.

View 2 Replies View Related

The Description For Event ID ( 22 ) In Source ( MSSQLServerOLAPService ) Cannot Be Found

Dec 20, 2005

I have tried my best and not able to locate the source of this error.

The error logged in Event Viewer shows the source is from MSSQLServerOLAPService, but it is impacting the Reporting Services reports that use the Analysis Services as a data source to hang frequently.

Have anyone else encounter this and know what the Category 256 Event ID 22 means?

I am using SQL 2005 RTM MSAS and MSRS.

View 2 Replies View Related

Extending Source Components?

Apr 29, 2008


How can I create a source extension that reads a text file and returns a XML file? I would like to have an xml File as output, because the information is already normalized.

If I extend the class €śPipelineComponent€? I can just define IDTSExternalMetadataColumn90 as output. And I do not want to have columns. I would like to return a xml file

Is it possible to achieve this?

View 1 Replies View Related

Number Of Source Components

Mar 14, 2008

Hi All,
I want to run 13 flat file sources in one Data Flow Task, is it possible to do so? I mean I have File1, File2, File3 .....File13 as a Flat file source, Thus i want to have a transformation component for each Flat file source (File1, File2 etc), is it possible to run all these in one Data Flow Task, would you suggest your best practices? Thank you for your advice and consideration.

Example:

FlatFile1 FlatFile2 FlatFile3 FlatFile4 Etc
: : :
: : :
Derived Column1 Derived Column1 Derived Column1 Etc
: : :
: : :
OLEDB Destination1 OLEDB Destination2 OLEDB Destination3

This is to show i have 13 like this in one Data Flow Task.
Thanks

View 5 Replies View Related

Need VB.NET Custom Components Source Code Example

May 21, 2006

I need VB.NET source code showing how to create a Custom Component. in SSIS (All the ones I've seen are written in C#.)



TIA,



barkingdog

View 1 Replies View Related

OLEDB Source Control

Jan 15, 2008

I was having one package which uses a source query in OLEDB Source Control and fetches the record and a couple of lookups and then an oledb command to insert/update the records in the table using as SP. I changed the source query(Infact the package) and removed in lookup and a different SP was called similar to the old one. But my problem is the package which was before taking only minutes to update 50,000 records is now taking more than 2 hrs. The problem is the number of records it is fetching from the source each time is very less.. its fetching hardly 500 records a time compared to nearly 2500 records before. Where am i going wrong? Any suggestion greatly appreciated.

View 5 Replies View Related

MDX OLEDB Source Vs Datareader

Feb 12, 2008

Hi,

I am running an MDX query in SSIS but I don't know what is the best way of doing this, performance wise.
I know I can run the MDX query through an openquery in the OLEDB, and also run it through a Datareader, no openquery needed.

I know the datareader is slower in a normal basis due to .Net, but in this case the OLEDB is running an open query to a linked server which won't be fast like running a regular SQL.

If anyone knows which of this two run faster in this scenario I'll appretiate if you let me know.

View 1 Replies View Related

OleDB Source And Parameters

May 11, 2007

Hi,



Firtsly - I am new to SSIS if my approach could be improved then I welcome suggestions.



Scenario: I have a large SSIS package that consolidates / summarizes work week information from several data sources. Currently each data flow task in the control flow calculates the from and to date that is filtered on, for example:



DECLARE @FromDT AS DATETIME
SET @FromDT = CAST(FLOOR( CAST( DATEADD(D, -7, GETDATE()) AS FLOAT ) ) AS DATETIME)

DECLARE @ToDT AS DATETIME
SET @ToDT = CAST(FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME)



I would like to remove these statements that appear in most steps and replace them with a global variable that is used throughout the package. This statement would only appear once & it would make the package much easier to run after failure etc.



Problem: I am using Data Reader Source with the 'SQLCommand' property specified. It looks like parameters are only supported if an OleDB connection is used?



So I switched to an OleDB connection and no parameters are recognised in the string - a forum search reveals that parameters in sub queries are not always found properly. The solution to this problem appears to be, to set 'Bypass Prepare' to True but this is a property for the Execute SQL task, not the Data Flow Task source.



Questions:

Does the Data Reader Source control from Data Flow Source toolbox section support parameters?
Can anyone suggest a fix to the OleDB Source issue with Parameters?
Is there a better way to solve my problem e.g. Using Execute SQL Task instead of Data Flow tasks etc

Example SQL:

This SQL is an example of the SQL for the OleDB Data Source (within a Data Flow task)



------------------------------
--RADIUS LOGINS
------------------------------
DECLARE @FromDT AS DATETIME
SET @FromDT = CAST(FLOOR( CAST( DATEADD(D, -7, GETDATE()) AS FLOAT ) ) AS DATETIME)



DECLARE @ToDT AS DATETIME
SET @ToDT = CAST(FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME)



DECLARE @Attempts AS BIGINT
SET @Attempts =
(SELECT COUNT(*)
FROM dbo.Radius_Login_Records
WHERE LoggedAt BETWEEN @FromDT AND @ToDT)



DECLARE @Failures AS BIGINT
SET @Failures =
(SELECT COUNT(*)
FROM dbo.Radius_Login_Records
WHERE LoggedAt BETWEEN @FromDT AND @ToDT
AND Authen_Failure_Code IS NOT NULL)



DECLARE @Successes AS BIGINT
SET @Successes = @Attempts - @Failures

DECLARE @OcaV1Hits AS BIGINT
SET @OcaV1Hits = (SELECT COUNT(DISTINCT LoginName)
FROM dbo.Radius_Login_Records
WHERE LoggedAt BETWEEN
@FromDT AND @ToDT
AND EAPTypeID = 25)



DECLARE @OcaV2Hits AS BIGINT
SET @OcaV2Hits = (SELECT COUNT(DISTINCT LoginName) AS OcaV2Hits
FROM dbo.Radius_Login_Records
WHERE LoggedAt BETWEEN
@FromDT AND @ToDT
AND EAPTypeID = 13)


SELECT
@Attempts AS ConnectionAttempts,
@Failures AS ConnectionFailures,
(CAST(@Successes AS DECIMAL(38,2)) / CAST(@Attempts AS FLOAT) * 100) AS SuccessRate,
@OcaV1Hits AS OcaV1Hits,
@OcaV2Hits AS OcaV2Hits



Please remember, I'm new to SSIS - so be detailed in your response. Thanks for your help!

View 5 Replies View Related

Using Varibles In OLEDB Source

Jun 21, 2006

Iam migrating data from one database to another .I want give input of that source and traget database names through globally declared user variables (@sourcename,@targetname)

How i can map the variables in OLE DB Source ..i dint find any option to that .
Can somebody help ?

Thanks
Kumar

View 1 Replies View Related

Flat File Source And ConnectionString Property

Sep 11, 2007

Hi,
i have inherited a SSIS project that was left unfinished by a previous developer. One thing i notice with it is that all the flat file sources in the connection manager have hardcoded paths for the ConnectionString property. I would like to change this so that at least the path, and if possible the file name, are dynamic - i.e. they are determined either by parameters passed into the package when it is run or they are contained within a config file.

Is this possible? Can anyone supply a link to an article or tutorial specifically covering this?

Many thanks

View 3 Replies View Related

Cannot Change The Length Property Of Excel Source

Sep 5, 2007

I have a SSIS package loading Excel file. The Excel Source automatically give the length of 255 for all text columns. However, some of the column may exceed 255 length.

I cannot change the length of Error output columns. "Error at Data Flow Task [Excel Source [508]]: The data type for "output "Excel Source Error Output" (517)" cannot be modified in the error "output column "F45" (2345)".
Error at Data Flow Task [Excel Source [508]]: Failed to set property "DataType" on "output column "F45" (2345)".
"


How to change it or truncate it to 255? I am using 64bit VS.

TIA

View 1 Replies View Related

Oledb Source Query Through Expression

Jan 10, 2012

I am putting the below query in a OLEDB SOURCE through a variable (it is a select statement with a where clause from one date to another).

"select TestRecordtype, request_id from department
where LOAD_TMSTP between
(select max(END_TMSTP) LOG) and
(TO_DATE("+RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System:tartTime] ), 2) + "-"
+RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System:tartTime] ), 2) + "-"
+RIGHT("0" + (DT_STR,4,1252)DATEPART( "yy" , @[System:tartTime] ), 2) + " "
+RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System:tartTime] ), 2) + "."
+RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System:tartTime] ), 2) + "."
+RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System:tartTime] ), 2) +",'DD-MM-YY HH24.MI.SS')) "

View 1 Replies View Related

Debugging OLEDB Source Component

Apr 29, 2008

I am debugging a Data Flow task in my SSIS package. When I run the package in debug mode, one of the OLEDB Data Sources turns red. I have rerouted all Error Output to a flat file, and put a Data Viewer on that path: no rows get sent. When I click the Preview button on this component in Design mode, I see the expected data and get no error messages. The connection does a simple table access...no SQL command. I don't see anything different between this component and other OLEDB sources in the same package that don't trigger any errors. I've tried dropping and re-creating the component with the same results.

What else can I do to debug this?

View 7 Replies View Related

Oracle OleDb Provider As Source

Mar 16, 2007

Guys,

I am having a nightmarish time getting an Oracle Connection Manager working as a source in my SSIS package.

The CM is called "OLTP_SOURCE". When I inspect the configuration and test connection, it succeeds, however when I go to run the package (both in debug mode and via DTEXECUI) I get the following error:

The AcquireConnection method call to the connection manager "OLTP_SOURCE" failed with error code 0xC0202009

After this happens, if I go into an OLE DB Source within a DFT, I get the following:

No disconnected record set is available for the specified SQL statement.

Now, if I go back into the CM, enter the password and test, it succeeds. From this point, I will go to preview the data in the OLE DB Source, and it comes back fine. However, when I go to run the package, I get the same error time and time again:

The AcquireConnection method call to the connection manager "OLTP_SOURCE" failed with error code 0xC0202009

The quick reader will suggest that the password is not being persisted. To this end, I have tried each of the following techniques to no avail:

1. Double, Triple and Quadruple check that the "save" password option in the CM is checked.

2. Hardcode the connection string in the dtsx XML-behind.

3. Enable Package Configurations and hardcode the connection string in the dstsconfig file.

4. Run the dtsx file using DTEXECUI, providing it with the configuration (that includes the hard-coded password).

5. Run the dtsx file using DTEXECUI, providing it the connection string in the Connection Managager override UI.


Can anyone help shed some light on what might be going on? So far, it is obvious that there has to be something that I am doing wrong because (syntax dialect differences aside) I can't imagine that Oracle sources should be this much of a headache.

Thanks,



Rick

View 3 Replies View Related

Trouble With OLEDB Data Source

Apr 20, 2006

A little background first. I have a header table and a detail table in my staging area/ods. I need to join them together to flatten them out for load. The Detail Table is pretty deep - approx 100 million rows.

If I use the setting (table or view) and set the table name (say, the detail table), the package starts up nicely. But if I switch the OLE DB Source to using a SQL Statement and then join the tables in the SQL, then the Pre-Execute phase of the package takes a VERY long time. I have waited as long as 30 minutes for this phase to complete, but it never finished.

Another twist...If I take the join select statement out of the OLEDB Source and put it in a view on the server, then swith the OLE DB Source to look at the view using the (table or view) mode, then the package gets through the Pre-Execute phase just fine.

Can someone go into detail as to what the Pre-Execute phase does and why a deep table might make it take a long time? I know already that the pre-execute phase caches the lookups, but not much else.

Any help?

Mark

http://spaces.msn.com/mgarnerbi

View 3 Replies View Related

Stored Procedure As OLEDB Source

Jul 18, 2006

Hi,

at first...
Yes, I have seen this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=366077&SiteID=1 and yes, my Stored Procedure contains a "Set nocount on"...
:-)

My Stored Procedure contains variable SQL-Code to check a table (given by parameter) against some masterdata tables and I would like to write the result of the check to a flatfile to be able to send it via mail.

but evoking the Stored procedure brings up no meta data for the Flatfile Destination - the preview works...

any other hints?
except for doing the ckeck completely in SSIS?
:-P

cheers
Markus

View 1 Replies View Related

Question OLEDB Source With SQL And Parameters

Mar 14, 2008

Hello All,

I understand that the parser is having issues parsing my second command but I was wonder if anyone had stumbled on a work around for this:

-- OLEDB Source has no problem with this:
SELECT *
FROM some_table
where
last_update_dt = ?


-- OLEDB Source errors on this:
SELECT *
FROM some_table
where
Convert( char(12), last_update_dt, 112 ) = Convert( char(12), Cast( ? as DateTime), 112 )

The first SQL statement won't return the desired rows because of the wonderful time stamp, the second works well but the provider won't parse it. I have used the "SQL command from variable" to work around this but we have some tables with 200+ columns, so the only way to use the "SQL command from variable" is to do a select *, which I'm trying to avoid, for both performance reasons and company standards.

Any thoughts?

Thanks,

Raymond

View 4 Replies View Related

Poor Sql Performance In Oledb Source?

Mar 31, 2008

i need to select data by using a very complex sql statement. when i use a ole db source componente and choose SQL command as data access mode the process never ends. but when i put the sql statement in an sql task component it works fine and fast. isn't an oledb source always based on an sql statement (select *)? so how is it possible that this component becomes so slow?

View 11 Replies View Related

OLEDB Source Table Locks?

Sep 15, 2006

Hi All,

Is it possible that an OLEDB Data Flow Source is imposing locks on the source tables? The source is an SQL Server OLTP environment, and although the package will be scheduled to run nightly when the application sees little to no use, I want to be sure that the process isn't impacting any application functions.

Thanks for the advice!

Rocco

View 1 Replies View Related

0xC0010001 With Parameterized OLEDB Source

Jul 21, 2005

I am trying to call a stored procedure as part of my OLEDBSource.  It takes two parameters.  @StartDate datetime and @EndDate datetime.

View 9 Replies View Related

Passing Variables In OLEDB Source

Jul 31, 2006

Hi,

I have created lastUpdatedDate variable on package level. I have run a sql task and store a date in that variable.

now i am trying to pass that variable as parameter to oledb source connection (using command). it seems that we cant pass parameter in any sub query or derived table in query. its only working in outer query as soon as we place ? in WHERE clause of inner query it start throwing an 'Syntax Error' error saying that connection provider might not support that.

any idea ?????

I dont want to use command variables as my query is going to be quite big.

Note : I have tried Sql Server Native and OLEDB provider for sql server and this behaviour is seems to be constant in both.

Thanks,

Furrukh baig

View 2 Replies View Related

OLEDB Source To Flat File

Jun 7, 2007

Hi,



I'm using an OLEDBSource to select some data and then putting to in a Flat File destination.



However, when I look at the data in the OLEDBSource, they´re like this:

1. id

2. name

3. address



...but in the flatfile it comes out in the wrong order.



How can I fix this?



Thank you so much.

View 1 Replies View Related

A Field Or Property With The Name 'Jan' Was Not Found On The Selected Data Source.

Jul 31, 2007

I have this Stored Procedure:
Create PROCEDURE ListEventas If MONTH(GetDate()) <= 6 Begin SELECT EventTitle,  EventDuration,  (CASE WHEN MONTH(StartDate) = 1 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Jan',  (CASE WHEN MONTH(StartDate) = 2 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Feb',  (CASE WHEN MONTH(StartDate) = 3 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Mar',  (CASE WHEN MONTH(StartDate) = 4 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Apr',  (CASE WHEN MONTH(StartDate) = 5 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'May',  (CASE WHEN MONTH(StartDate) = 6 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Jun'FROM dbo.tblEvent INNER JOIN  dbo.tbl ON (tblEvent.EventID = tblEventdate.EventID)WHERE  YEAR(StartDate) = Year(GetDate())group by EventTitle, EventDuration,StartDate,EndDateEnd Else  BeginSELECT EventTitle, EventDuration,(CASE WHEN MONTH(StartDate) = 7 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Jul',  (CASE WHEN MONTH(StartDate) = 8 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Aug',  (CASE WHEN MONTH(StartDate) = 9 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Sep',  (CASE WHEN MONTH(StartDate) = 10 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Oct',  (CASE WHEN MONTH(StartDate) = 11 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Nov',  (CASE WHEN MONTH(StartDate) = 12 THEN Datename(Day,StartDate) + ' - ' + Datename(Day,EndDate) ELSE '' END) AS 'Dec'FROM dbo.tblEvent INNER JOIN  dbo.tbl ON (tblEvent.EventID = tblEventdate.EventID)WHERE  YEAR(StartDate) = Year(GetDate())group by EventTitle, EventDuration,StartDate,EndDateEnd 
 When I execute it in the SQLExpress, the result returned as expected. But when I bind to Gridview I got this error:
A field or property with the name 'Jan' was not found on the selected data source. 
How do I solve this?  
 I am using drag and drop SQLDatasource to call the Stored Proc and VB.net is the language.  Thanks
 

View 4 Replies View Related

Purpose Of OLEDB Source Error Output?

Nov 6, 2007



This might be an ignorant question, but I can't figure this out.

What is the purpose of the Error output data flow from the OLEDB Source? I am trying to understand an example of what kind of "error" would cause a row to go down this path, and I can't come up with one.

Does anyone have a good example of how this could be useful?

View 5 Replies View Related

Dynamically Selecting Tables In OLEDB Source

Mar 17, 2008

hello guys,

I have 10 tables, table1, table2, table3, table4.......table10. all these tables have different structure.
From each of these tables I want extract data and dump into flat file csv.

So i have OLEDB source and FlatFile Destination.

If i write seperate data flow task for each of the tables, then there is no issue.

But i want to use a single data flow task for all these tables. So for this, i use a variable @SQLStr . And i dynamically set the value of this variable to select * from table1, select * from table2.........selct * from table10.

So in the OLEDB source I select Data Access Mode as : SQL Command from variable. And I use @SQLStr for this varible.

For Destination, i dynamically generate the flat file for each of the table.

But this doesnt work, i get validation errors.

So, first can i use a single data flow task to dynamically change the source(different source tables) and destination. If so, what i am missing in the above process?

any help appriciated.

Thanks

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved