VBA ODBC Connection with 32bit and 64bit systems


S

sjsean

I have recently received an updated system which has both 32bit and 64bit. On my prior system using an ODBC connection within my VBA code worked (andstill works on old laptop) without error. However, on my new 32/64bit machine I receive an error that the connection is not open. Can someone suggest a workaround for both systems since I have some people on older machinesand will have more people on newer machines.

Dim cnn As ADODB.Connection

Set cnn = New ADODB.Connection

cnn.Open "IDK", "username", "password"

If anyone can provide an clear article or clear step by step instructions on a fix that would be greatly appreciated.

Sean
 
Ad

Advertisements

P

Phil Hunt

There are 2 place you can set up ODBC driver on your machine. Look for them.
Sorry I cannot be more specific

I have recently received an updated system which has both 32bit and 64bit.
On my prior system using an ODBC connection within my VBA code worked (and
still works on old laptop) without error. However, on my new 32/64bit
machine I receive an error that the connection is not open. Can someone
suggest a workaround for both systems since I have some people on older
machines and will have more people on newer machines.

Dim cnn As ADODB.Connection

Set cnn = New ADODB.Connection

cnn.Open "IDK", "username", "password"

If anyone can provide an clear article or clear step by step instructions on
a fix that would be greatly appreciated.

Sean
 
Ad

Advertisements

D

Douglas J Steele

As Phil stated, there are two different ODBC client applications on x64
machines. One (the default x64 client) is located at
C:\Windows\System32\odbcad32.exe, the other (x86) is located at
C:\Windows\SysWow64\odbcad32.exe

I suspect you created the DSN using the wrong client.

"sjsean" wrote in message

I have recently received an updated system which has both 32bit and 64bit.
On my prior system using an ODBC connection within my VBA code worked (and
still works on old laptop) without error. However, on my new 32/64bit
machine I receive an error that the connection is not open. Can someone
suggest a workaround for both systems since I have some people on older
machines and will have more people on newer machines.

Dim cnn As ADODB.Connection

Set cnn = New ADODB.Connection

cnn.Open "IDK", "username", "password"

If anyone can provide an clear article or clear step by step instructions on
a fix that would be greatly appreciated.

Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top