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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to control workflow from the starting Active X task?

Status
Not open for further replies.

daglugub37

Technical User
Oct 21, 2003
201
US
I have a DTS package that imports data into a table from a export file.

The deal is the export table is divided into 4, to create import/export files as batches. eg tableA_batch1.txt, tableA_batch2.txt etc etc.

What I would like to do is add a SQL task to the package; which simply truncates and reindexes the table before the import begins.

What I need to do is somehow code this active X to evaluate ("batchNumber").Value

If value is 1 then to start package with SQL task
If value is 2, 3 or 4 then to start with Datapump task

Is it possible to control workflow from the starting Active X task? If so any help on the statement would be greatly appreciated as I have very limited programming skills.

Thanks
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
Main = DTSTaskExecResult_Success
End Function


DTSGlobalVariables("sourcePath").Value=DTSGlobalVariables("gExportPath").Value & DTSGlobalVariables("gFileName").Value & DTSGlobalVariables("batchNumber").Value& ".txt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top