Passing parameter to stored procedure in DTS (reply)
I have not been able to find a direct method to do this. What I do is, create an ActiveX task before the execute sql task, which will build a new SQL string and update the task's query. Here's a sample code :
Function Main()
dim pkg
DTSGlobalVariables("UID" = "sa"
set pkg = DTSGlobalVariables.Parent
pkg.Tasks(1).Properties("SQLStatement".value = "exec sp_who2 '" & DTSGlobalVariables("UID" & "'"
Main = DTSTaskExecResult_Success
End Function
------------
Zombie at 5/11/01 11:57:24 AM
When executing a stored procedure inside a DTS package, Is it possible for me to assign the input parameters dynamically from the Global variables?