Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 ADO.NET Parameters and Mapping Destinations

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2012-08-21 : 13:29:13
I have an ADO.NET data flow source, that needs to use a variable as part of it's SQL command.

From what I can tell, you can't do this within the ADO.NET data flow source. You must do this outside the Data Flow Task, as an expression.

That said, I have created an expression on the Data Flow Task for the ADO NET SOURCE.SQLCOMMAND property...

How do I now map the query results to a OLE DB Destination?
The ADO.NET data flow source does not appear to reference the expression set outside on the Data Flow Task.

Thanks
Q

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-21 : 13:35:28
add a oledb destination task inside data flow task and link the output from ADO.NET source to input of OLEDB destination.
There's nothing different from way you do it normally. The only difference is command property of source getting mapped to an expression using expression builder which it will evaluate at runtime

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2012-08-27 : 10:32:11
My expression (set on the dataflow task) does not get evaluated at run time.

SSIS is using the hard coded SQL statement in the ADO.NET source from within the dataflow tab).

It appears that I am unable to leave the SQL command text empty.

Hope this makes sense...
Go to Top of Page

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2012-08-27 : 11:13:01
Disregard, thanks for your help...! I got it to work.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-27 : 11:43:07
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -