Export (0) Print
Expand All

Creating DTS Packages in Visual Basic

SQL Server 2000

You can implement Data Transformation Services (DTS) packages in Microsoft® Visual Basic® by following these installation instructions:

  • You need to install the Microsoft SQL Server™ client tools and Visual Basic version 5.0 Service Pack 3 or later on the computer on which the packages are to be developed.

  • You need to install the SQL Server client cools on the computers on which the packages are to be run.

You do not need to install Visual Basic on the target computers. The necessary Visual Basic files are supplied by the installation kit produced with the Visual Basic Setup or Package and Deployment Wizards.

Configuring the Visual Basic Development Environment

To implement a DTS program in Visual Basic, open a new or existing project, as appropriate, in the Visual Basic development environment. You can use any of the following project types:

  • Standard EXE

  • ActiveX EXE

  • ActiveX DLL

  • ActiveX Document EXE

  • ActiveX Document DLL

From the Project/References dialog box, select the references listed in the table below if you use any of the corresponding DTS features in your application. This +will include the library file from the table in your Visual Basic project.

Reference DTS Features Library File
Microsoft DTSPackage Object Library Any DTS object or feature dtspkg.dll
Microsoft DTSDataPump Scripting Object Library Any transformation supplied with SQL Server or any DTS scripting object dtspump.dll
Microsoft DTS Custom Tasks Object Library The Message Queue task, the File Transfer Protocol task or the Dynamic Properties task custtask.dll

The library files are installed in C:\Program Files\Microsoft SQL Server\80\Tools\Binn\ unless overridden by the SQL Server installation.

Using DTS Packages Saved as Visual Basic Files

If you have used DTS Designer or the DTS Import/Export Wizard to save a DTS package as a Visual Basic file, these files can be used as templates, or starting points, for user-implemented Visual Basic packages.

The generated code sets all properties of all objects referenced in the package to the initial values they will have when package execution begins. This includes those that are set to their default values. Thus, many of the property assignments are redundant and can be removed. These redundant property settings do not appear in the Visual Basic code examples in this section.

For more information, see Running a DTS Package Saved as a Visual Basic File.

See Also

Saving DTS Packages in Visual Basic

Show:
© 2014 Microsoft