Do you really mean DTS (SQL2000) or its new SSIS? In any case, I had a similar problem when I had to specify several dynamic connections to the package. I decided that this is:
:
- SQL :
- ""
- "" -
:
- SQL- / @User:: variables
- Script, →
DTS:
' Get a reference to self (the DTS package currently running)
Set oPkg = DTSGlobalVariables.Parent
' Get connection to Input File - Set Path
Set oCn = oPkg.Connections.Item ( "MasterFileIn" )
oCn.DataSource = workAreaPath & "MasterFile.txt"
SSIS , . ScriptMain.cs:
ConnectionManager cm = Dts.Connections["MasterFileIn"];
cm.ConnectionString = Dts.Variables["DataSource"].Value;