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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can DTS package saved as VB file be brought back into SQL Server 2000 2

Status
Not open for further replies.

traveller4

Programmer
Sep 18, 2002
62
CA
I have a package that I designed through DTS designer and I saved a visual basic file, made the changes I needed. My question is:

Is it possile to import the file back into SQL Server 2000 as a package without retooling it through DTS designer.


Thanks in advance
 
I am not so familiar with vb(so pardons if this won't make sense), but can't you use .SaveToSQLServer method of Package object in your vb instead of .Execute method to in order to save the package.

Of course you need the vb source code, not an executable.

Cheers
 
You can run the Visubal Basic .bas file to regenerate the DTS. If you look at the Main routine that is created in the .bas file, it has comments at the bottom of the routine for setting the sa user id and password and also for creating the package versus running the package.

'---------------------------------------------------------------------------
' Save or execute package
'---------------------------------------------------------------------------

You need to uncomment out the following line and supply the necessary user and password:

'goPackage.SaveToSQLServer "(local)", "sa", ""

You also need to COMMENT OUT the following line so the package does not run:

goPackage.Execute


Good Luck!!



 
One additional note:

If you originally had the package nicely aligned in the DTS designer, It will still function correctly but does a horrible job of aligning the tasks.
 
Thank to both of you for the reply.

That was I needed.

APPRECIATE THE HELP

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top