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 2005 Forums
 SSIS and Import/Export (2005)
 not executing SSIS SQL task by passing variable

Author  Topic 

under2811
Constraint Violating Yak Guru

366 Posts

Posted - 2008-06-11 : 08:43:35
Hi,

I am creating SSIS package which using Execute SQL Task to which I am supplying one .sql file code is

delete from Test where ID = @ID

I defined @ID variable to SSIS and also path where .sql file placed but i am not able to execute this package i am getting error like can not find C:\@Path file......

As i got information that passing such variable to .sql you need ADO.net connection so I changed SQLSERVER Database connection string to ADO.net .... after that when i set hard core value for these variable i.e for @ID and @Path then it runs sccessfully but by setting parameter i am getting above error


Any suggestion that will be gr8 help for me

T.I.A

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-11 : 10:14:39
Have you set the dynamic property of file path to be "c:\" + @Path in dynamic properties tab of the task?
Go to Top of Page

under2811
Constraint Violating Yak Guru

366 Posts

Posted - 2008-06-11 : 10:48:52
Hi

For perticular running this ADO.net changes i done in my SSIS what change i need to do with C#.net coding basically to call this pacakge any provider i need to use?????.... for OLE DB i am using connection string as "Data Source=Server_Name;User ID=sa;Initial Catalog=DB_Name;Provider=SQLNCLI.1;Auto Translate=False;"

for ADO.net connection I m getting "Data Source=Server_Name;User ID=sa;Initial Catalog=DB_Name;"

i just need to know two thing one thing is above and another thing is really need to use ADO.net connection for passing variable SSIS to .sql file?????. will OLE DB not work for it?????


T.I.A
Go to Top of Page
   

- Advertisement -