You can run a Data Transformation Services (DTS) package that has been saved by one of the DTS tools as a Microsoft® Visual Basic® file. The saved module, a Visual Basic .bas file, consists of declarations and a Sub Main and may contain other Subs called by Sub Main. The Subs contain all the logic of the DTS package.
Here are the basic steps for incorporating a Visual Basic module file into a Visual Basic project and executing it on a computer running the Microsoft SQL Server™ client tools:
Not all DTS programs will require all three of these libraries.
No indication of completion will be given other than the Visual Basic Development Environment will go back to design mode.
You may want to add completion notification and error handling and controls to allow the user to invoke the transformation.
The Visual Basic project you created from the generated Visual Basic file can be used to save the DTS package to SQL Server.
Here are the basic steps for saving Visual Basic files to SQL Server:
'objPackage.SaveToSQLServer ...
objPackage.Execute
When the Visual Basic Development Environment goes back to design mode, the package is saved to SQL Server.
The package can now be edited, maintained, and run from DTS Designer. It can be saved again as a Visual Basic file from DTS Designer.
Executing DTS Packages in Visual Basic