Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a specific step in a DTS from ActiveX script

Status
Not open for further replies.

GJP55

Technical User
Feb 2, 2003
220
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top