daglugub37
Technical User
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
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