I would like to execute a specific step contained in the same DTS based on a value that is generated within an ActiveX script. All I need is the line of code that executes the step. Dont seem to find this is the help files?
Code emample:
------------------------------------------------------
Function Main()
Dim myConn
Dim rs
Dim MySQLCmdText
Dim oPkg
Set oPkg = DTSGlobalVariables.Parent
Set oStep1 = oPkg
' instantiate the ADO objects
set myConn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
myConn.Open =.......
mySQLCmdText = "select Product from prodicts"
rs.Open mySQLCmdText, myConn
rs.MoveFirst
Do While Not rs.EOF
DTSGlobalVariables("source_file") = rs("Source_file")
DTSGlobalVariables("File_Name") = rs("Source_file") & ".csv"
.......
'execute a specific task with the dts here
'execute another specific task
....
rs.movenext
loop
Main = DTSTaskExecResult_Success
End Function
-----------------------------------------------------------
Thanks
Code emample:
------------------------------------------------------
Function Main()
Dim myConn
Dim rs
Dim MySQLCmdText
Dim oPkg
Set oPkg = DTSGlobalVariables.Parent
Set oStep1 = oPkg
' instantiate the ADO objects
set myConn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
myConn.Open =.......
mySQLCmdText = "select Product from prodicts"
rs.Open mySQLCmdText, myConn
rs.MoveFirst
Do While Not rs.EOF
DTSGlobalVariables("source_file") = rs("Source_file")
DTSGlobalVariables("File_Name") = rs("Source_file") & ".csv"
.......
'execute a specific task with the dts here
'execute another specific task
....
rs.movenext
loop
Main = DTSTaskExecResult_Success
End Function
-----------------------------------------------------------
Thanks