DTS Programming Samples
The following samples illustrate Microsoft® SQL Server™ 2000 Data Transformation Services (DTS) application development in Microsoft Visual C++® and Microsoft Visual Basic®. They also include DTS packages.
|CustomTaskNoUI||Active Template Library (ATL) template. Implements the framework for a DTS custom task that does not support a user interface.|
|CustomTaskWithUI||ATL template. Implements the framework for a DTS custom task that supports a user interface.|
|CustomTransform||ATL template. Implements the framework for a DTS custom transformation.|
|DTS Custom Transformation Sample||C++ sample. Concatenates a number of ANSI source columns into a single destination column.|
|DTS Custom Task||C++ sample. Creates and registers a DTS custom task that is similar to the CreateProcessTask object.|
|DTSCopy||C++ sample. Copies a single source column into a destination column of the same type.|
|DTSStrings||C++ sample. Reformats two source columns that are assumed to be a first and last name into a single destination column.|
|DTSTskGVUpdate||C++ sample. Displays and updates the value of a global variable through a user interface.|
|DTSTskPropIcon||C++ sample. Displays a message.|
|Packages||DTS package sample. Demonstrates how to create and execute packages and how to solve typical business problems.|
|Complex Transformation Sample from SQL Server to Excel||Visual Basic sample. Copies data from the pubs database to a Microsoft Excel spreadsheet, transforming it into a Microsoft PivotTable®.|
|DTS Package Sample Supporting Multiple Source and Destination Providers||Visual Basic sample. Creates a package from a variety of data sources and destinations.|
|DTSActiveScriptTask||Visual Basic sample. Demonstrates how to run a Microsoft Visual Basic Scripting Edition (VBScrip) script as part of a DTS Task.|
|DTSApplicationObject||Visual Basic sample. Illustrates some of the information that can be obtained from the DTS Application object.|
|DTSAppObject||Visual Basic sample. Demonstrates use of the DTS Application object on the local server.|
|DTSBulkInsertTask||Visual Basic sample. Demonstrates how to use DTS to perform a bulk insert operation from a flat text file.|
|DTSCopyDatabase||Visual Basic sample. Demonstrates how to use the DTS TransferObjectsTask object to copy a database.|
|DTSExecProcess||Visual Basic sample. Demonstrates how to run a Win32 application from a DTS task.|
|DTSExecSQLTask||Visual Basic sample. Demonstrates how to execute an SQL statement while running a DTS package.|
|DTSExecutePackage||Visual Basic sample. Demonstrates how to execute programmatically a DTS package that has been saved in .dts format to a structured storage file.|
|DTSFTPTask||Visual Basic sample. Demonstrates how to use DTS to copy non-SQL Server files from a source to a destination.|
|DTSPackageInfo||Visual Basic sample. Illustrates some of the information that can be obtained from the DTS Application.GetPackageInfos method.|
|DTSTransferObjectsTask||Visual Basic sample. Demonstrates how to use DTS to transfer various types of SQL Server objects from the pubs database to the pubs2 database.|
|FoodMart2000||Visual Basic sample. Demonstrates how to use the Visual Basic file output from the DTS import/export wizard to convert the FoodMart 2000.mdb database to SQL Server 2000.|
|Pub2Pubs||Visual Basic sample. Copies the Authors table from the pubs database to the pubs2 database while performing several operations on various fields.|
|Simple DTS Package Sample Using Visual Basic||Visual Basic sample. Demonstrates how to build and execute a DTS package.|
|Simple Transformation Sample Between Two SQL Server Tables||Visual Basic sample. Copies data from a source table to a destination table after a Transact-SQL script is used to create a sample table in the pubs database.|
To install the samples during SQL Server installation
- On the Setup Type page, select Custom.
- On the Select Components page, under Components, select Code Samples.
Samples are installed as a self-extracting file. To extract the samples, double-click Unzip_dts.exe, located at C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Dts. All samples include a project file applicable to the language used.
C++ samples require Visual C++ version 6.0. Visual Basic samples require Visual Basic version 6.0.