![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
VB6 ( SP6 ) & SQL 2000 In my vb code i have a public connection to to the SQLServer by using the following code Set UserDbconnect = New ADODB.Connection UserDbconnect.ConnectionTimeout = 60 UserDbconnect.ConnectionString = "DSN=MyDSN;UID=MYUID;PWD=MYPWD;" UserDbconnect.Open This works fine for executing Stored procedures and Select queries, however when firing off a DTS, the only way i know how is using the code below sServer = ServerName sUsername = UserName sPassword = UserPassword sPackageName = DTSName ' Load Package oPKG.LoadFromSQLServer sServer, sUsername, sPassword, _ DTSSQLStgFlag_Default, , , , sPackageName Does anyone know of a way to use the curent database connection rather than having to hard code in the server name etc ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |