![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a load of VB script tasks that contain something like the following: '------------Connect and open pm table Set Cnn=CreateObject("ADODB.Connection") cnn.Provider = "sqloledb" Cnn.ConnectionString = "Provider=SQLOLEDB; Trusted_Connection=yes; Server=myserver; Database=mydatabase" Cnn.Open . . . We have a production server and a development server, and it is necessary to manually change the connection string code when moving scripts between servers. This does not always happen, causing production damage. Very Bad! I would like to be able to connect using a UDL identified by a global variable like in several other of our packages that do not use ActiveX Script Tasks. Is it possible? How do I do it? Thanks, Michael |
#3
| |||
| |||
|
|
You could have a ActiveX script that opens the UDL file (its unicode BTW) and read the connection string line and use it in the .ConnectionString property Paul "Snake" <Snake (AT) discussions (DOT) microsoft.com> wrote in message news:E740818B-2368-4451-A0EF-E104BE298AD7 (AT) microsoft (DOT) com... I have a load of VB script tasks that contain something like the following: '------------Connect and open pm table Set Cnn=CreateObject("ADODB.Connection") cnn.Provider = "sqloledb" Cnn.ConnectionString = "Provider=SQLOLEDB; Trusted_Connection=yes; Server=myserver; Database=mydatabase" Cnn.Open . . . We have a production server and a development server, and it is necessary to manually change the connection string code when moving scripts between servers. This does not always happen, causing production damage. Very Bad! I would like to be able to connect using a UDL identified by a global variable like in several other of our packages that do not use ActiveX Script Tasks. Is it possible? How do I do it? Thanks, Michael |
![]() |
| Thread Tools | |
| Display Modes | |
| |