This document describes how to use Visual C #. net to create a custom DTS task. You can use C #. net to create custom tasks to extend the data transmission function. After that, you can install and register the task. It shows the DTS design, just like the default DTS task. In short, you can use. NET Framework to create custom tasks.
In addition to creating a DTS custom task, this article also includes the following parts:
1. The custom code in this article is divided into compilation, registration, and installation of custom tasks;
2. You can run custom tasks;
3. You can use the tools mentioned in this article during development (unless otherwise stated, these tools are already included in... NET ).
Create a timely package for DTSSpkg. dll
If a COM component is accessed based on a Microsoft. NET client, you must use a package (Included in this component ). This type of package is a timely running package (RCW) And you can also compile it by opening the Dtspkg. dll Type Library. You can also use the export library tool (tlbimp.exe) to compile RCW, for example:
Tlbimp.exe "C: ProgramFilesMicrosoft SQLServer80oolsBinndtspkg. dll"/out: Microsoft. SQLServver. DTSPKG80.dll/keyfile: DTSPkg. snk
The "/keyfile" parameter represents Microsoft. SQLServer. DTSPkg80.dll with a strong type name using the public or private keyword. Use the strong alias tool (sn.exe) to create a keyword before DTSPkg. snk:
Sn.exe