Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a DTS

Status
Not open for further replies.

GerardMcL

Technical User
Aug 5, 2004
212
0
0
IE
Hi,

I use a program that changes the database name every time the project is edited. This software uses SQL server for its database. So it'll be called e.g.

CC_12_13_20R - then we'll make changes and its now called
CC_16_19_50R

The problem is I want to set up a DTS package for clearing excess data out of one database and placing it in another. However I would like to provide the customer with a form for doing this. So they would enter in the database name in a text box.

Can I create a DTS using parameters? Can I create a DTS package purely through VB code?

Any need any further explanation just ask!
Thank You for all the Help!
 
you can create a DTS package with VB code only.

You will need to add a reference to DTS Package object library, and then go from there.

You can also create a package through EM, and then save it as a Visual Basic source code and look at it to see what is involved.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
if you're using SQL 2000, you can create a DTS package in the enterprise manager and then save it as VB code. Then copy that code to your program and replace the appropriate parts with variables. (the created code if fairly intuitive)

If you are using SQL 7.0, the sample VB code that comes with it has a script that will convert any DTS package into VB script, then you can port THAT code. That sample code may be a pain to use, but it's way easier than writing a DTS package from scratch in VB.

Hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top