I have several ActiveX scripts as part of various packages I run. Within these scripts I set a connection to the local server that's running the DTS packages.
For example:
Dim conMyCon
Dim strConnection
Set conMyCon = CreateObject("ADODB.Connection"
strConnection = "Provider=SQLOLEDB.1; " & _
"Data Source=MyServer; " & _
"Initial Catalog=MyDb; " & _
"user id =sa;password=MyPass;"
conMyCon.Open = strConnection
The problem is that when I move my packages from one server to another (from test to production), I have to go into each ActiveX script and change the Data Source parameter to the name of the new server it resides on.
Is there a way that I can refer to the current (local) server in the ActiveX script so that I don't have to hardcode the server name?
Thanks,
Rick
For example:
Dim conMyCon
Dim strConnection
Set conMyCon = CreateObject("ADODB.Connection"
strConnection = "Provider=SQLOLEDB.1; " & _
"Data Source=MyServer; " & _
"Initial Catalog=MyDb; " & _
"user id =sa;password=MyPass;"
conMyCon.Open = strConnection
The problem is that when I move my packages from one server to another (from test to production), I have to go into each ActiveX script and change the Data Source parameter to the name of the new server it resides on.
Is there a way that I can refer to the current (local) server in the ActiveX script so that I don't have to hardcode the server name?
Thanks,
Rick