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!

Call DTS from VBS?

Status
Not open for further replies.

thermidor

Programmer
Nov 28, 2001
123
0
0
US
Hi All,

I have a VBS program that creates a text file. After the file is created, I want to load some of the values from the file into SQL Server. Is the best way to do this to call DTS from VBS? If so, can anyone tell me how this can be accomplished/Point me to a tutorial on-line?
I know how to accomplish this with bcp but I feel like I should be doing it with DTS...

TIA,
Sven
 
I found the answer and am posting it in case it might be of use to anyone else...

set objDTSPackage = CreateObject("DTS.Package")

objDTSPackage.LoadFromSQLServer "myDB", "sa", "", DTSSQLStgFlag_Default, "", "", "", "Test_Pkg"

objDTSPackage.Execute

Set objDTSPackage = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top