Click here to Skip to main content
15,920,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a line of connection string stored in a table. When I run my package, it will call and execute another package. The process task will pull the connect string from the table then stored it as a variable then pass onto the child package.

The argument I am using in my process task:
"/FILE \"" +  @[User::entityStagePackage] + "\" 
/SET \\Package.Variables[User::controlCount].Properties[Value];\"" + (DT_WSTR,10) @[User::controlCount]  + "\" /SET \\Package.Variables[User::fileID].Properties[Value];\"" + (DT_WSTR,10) @[User::fileID]  + "\" 
/SET \\Package.Variables[User::filePathName].Properties[Value];\"" + @[User::filePathName]  + "\"" + " 
/SET \\Package.Variables[User::archivePath].Properties[Value];\""    + @[User::entityArchivePath]  + "\"" 
+ " 
/SET \\Package.Variables[User::stageID].Properties[Value];\"" + (DT_WSTR,10)@[User::stageID] + "\"" 
+ " 
/SET \\Package.Variables[User::MasterExceptionPkg].Properties[Value];\"" + (DT_WSTR,100)@[User::MasterExceptionPkg]  + "\"" + (DT_WSTR,500) @[User::iniVariable]

When executing the package, I got error message because of variable @[User::iniVariable]:
/Conn OH_STAGE;Provider=SQLNCLI10;Server=;Database=STAGE;Trusted_Connection=yes;" at "", The process exit code was "6" while the expected was "0".

If I take (DT_WSTR,500) @[User::iniVariable] out from my argument, the package run successfully. Can anyone please point out what's wrong with my connection string variable.

Evaluate Expression look like below:
/FILE "" /SET \Package.Variables[User::controlCount].Properties[Value];"0" /SET \Package.Variables[User::fileID].Properties[Value];"23" /SET \Package.Variables[User::filePathName].Properties[Value];"" /SET \Package.Variables[User::archivePath].Properties[Value];"" /SET \Package.Variables[User::stageID].Properties[Value];"26" /SET \Package.Variables[User::MasterExceptionPkg].Properties[Value];""
/Conn metaDBl; "Provider=SQLNCLI10; Server=; Database=STAGE; Trusted_Connection=yes;"

Thank you!
Updated 4-Dec-14 9:52am

1 solution

seems this Link[^] will help you
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900