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)
 How to Call A Stored Proc from a Script Task

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2011-10-05 : 14:38:04
Anyone out there able to call a Stored Procedure from a Script Task using SSIS 2008 (C#)?

Would really appreciate some sample code showing how this can be done?

Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-06 : 01:11:42
create a sql connection object by passing connection string of db you want to connect
create a new command which will be your execute statement EXEC ....
then use executenonscalar to execute it

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

Go to Top of Page
   

- Advertisement -