Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ODBC / ADODB.Connection - Not returning correct ConnectionString

708945Jun 25 2009 — edited Jun 29 2009
I have a 32-bit application running on a Windows Server 2008 (x64) server.

Since our application is purely 32-bit, I have ONLY installed the 32-bit drivers on the server.

We have some legacy code that creates an ADO connection object and passes in a VALID ODBC connect string.
It then successfully opens the connection.

The problem comes in where some custom code has taken that perfectly valid ADO connection and pulled the connectionstring property. This property returns without the ExtendedProperties, and therefore I get a "Data Source Name Not Found" error.

Below is a small VB snippet that shows the problem.

I have verified the registry settings are correct and the ODBC connectstring we pass in is valid. The VB snippet is being run using wscript.exe from the syswow64 folder. (To be assured it is executing as a 32-bit app)


Has anyone ever seen this before??? I'm at my wits end...


VB snippet below...

Option Explicit

Dim conn
Dim connStr
connStr = "DRIVER={Oracle in OraClient10gWin2K8x86};DBQ=ORCL;UID=SCOTT;PWD=TIGER;"
Set conn = CreateObject("ADODB.Connection")
conn.ConnectionString = connStr
MsgBox conn.ConnectionString
conn.Open connStr
MsgBox "Connection Opened"
MsgBox conn.ConnectionString
MsgBox "Done."

Edited by: user5461251 on Jun 25, 2009 3:46 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2009
Added on Jun 25 2009
1 comment
6,355 views