Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Change an Existing ODBC Driver via ActiveX

Author  Topic 

sqlmember2000
Starting Member

9 Posts

Posted - 2011-07-04 : 17:02:34
Hi,

Can someone direct me to a script that shows how I can dynamically change/reset the "Server" parameter on an Existing Connection (ODBC Driver for Oracle) that I have within my DTS package?

The Problem:
I have all the parameters filled out (i.e. Server, Username, Password). The problem is when I click "OK" to save, the value of my Server disappears.

I was hoping to create an ActiveX script to automatically set the Server, as I have two connection properties which goes out to 2 different db environments.

All that I can find was the below, which isn't exactly what I'm looking for. My connection properties exist, so how can I reset the parameter value dynamically for each of the db connection properties I have?


Option Explicit
Dim strConnection, conn

strConnection = "Driver={Microsoft ODBC for Oracle};" & _
"Server=OracleServerName;uid=username;pwd=password;"

Set conn = Server.CreateObject("ADODB.Connection")

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-07-04 : 17:07:14
I remember years ago in a dts package I was lost like you.
That time the solution was to type in ONE row without that &_ linebreak.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sqlmember2000
Starting Member

9 Posts

Posted - 2011-07-05 : 09:00:43
Thanks webfred for your feedback. My question was more so, how can I change the Extended Properties value of an existing connection via the script. That's the problem I run into now, how to reference that field so I can change the value.

Any help would be greatly appreciated!
Go to Top of Page
   

- Advertisement -