How to install ODBC 32-bit drivers on Windows 64-bit

December 5, 2011

HowTo, Windows

ODBC

First, we’ll start with some naming conventions with the basic premise that we are on a 64-bit Windows operating system (XP, Vista, 2003, 2008, 7).

So I will call “x86” or “32-bit” any process or DLL 32-bit – and “x64” or “64-bit” or process any 64-bit DLL.

How to differentiate?

A process x86 is usually installed in C:\Program Files (x86) or C:\Windows\SysWow64
A process x64 is usually installed in C:\Program Files or C:\Windows\System32

Some facilities may be different, which complicates the task – you can use Task Manager to see if your process is 32-bit or 64-bits.

On DLLs:

The x86 DLLs are usually located in C:\Windows\SysWow64
The x64 DLLs are usually located in C:\Windows\System32

The naming is unfortunately misleading. Note that SysWow64 means “Windows On Windows” – and thus allows a process to run in a 32-bit 64-bit OS.

Ok. So few case studies:

I have a 32-bit application using a DSN – I can not find my driver … ODBC.

So generally, we create a DSN with the administrator of ODBC data sources (commonly known odbcad32.exe). When you do Start / Run, you will then launch the 64-bit version of the tool (located in C:\Windows\System32).

Since this is a 64-bit process – it will not be able to load the drivers … that 64-bit – quite!

Example:

Here, one sees only 64-bit drivers.

For comparison, if you run 32-bit version odbcad32.exe located in C: \Windows\SysWow64, then you can create a DSN using a 32-bit driver:

We see here that we find the ODBC drivers for Excel to an Access database, etc …

These drivers, in fact, exist in 32-bit version for now. Office 14 will have a 64-bit version, and these drivers will normally be available in 64-bit.

In the 64-bit version, note the presence of the ODBC driver for Oracle (Oracle in OraClient11g_Home1 in my case – SQORA32.dll file) – which exists in 64-bit.

That of Microsoft (Microsoft ODBC for Oracle – msorcl32.dll file) does not exist in 64-bit – and should be avoided if your server is not in Oracle version 7 or 8 and the matrix 32-bit / 64-bit.

I have an application using 32-bit OLEDB – and I can not find my OLEDB provider …

Here, same as ODBC. There are 32-bit OLEDB providers and 64-bit versions.

The tool usually used to create an OLEDB connection string is the file. UDL. For those who do not know, create a text file (. TXT) on your desktop, and change the extension. TXT. UDL. Double-click the file and you will see a wizard. The wizard lists the OLEDB providers installed on the machine – and to test a connection. If you open the. UDL with Notepad, you will get a connection string ready to be copied / pasted into your application.

Example of a 64-bit:

Ok but how do I get a list of Providers 32-bit? seen that the. UDL is not 32-bit or 64-bit?

There is a bit smarter – because the assistant runs RUNDLL32.EXE UDL (process 32 or 64-bit).

We must therefore create a new UDL file (say special 32-bit) and use the following command line to open a UDL 32-bit:

C:\WINDOWS\SysWOW64\ rundll32.exe C:\PROGRA~2\COMMON~1\System\OLEDB~1\oledb32.dll, OpenDSLFile C:\USERS\the_name_of_user\desktop\Test_UDL_x86.UDL

Decrypt this command line:

C:\WINDOWS\SysWOW64\rundll32.exe to launch on the 32-bit RUNDLL32.EXE

C:\PROGRA~2\COMMON~1\System\OLEDB~1\oledb32.dll going to be setting the 32-bit version of oledb32.dll (located in C:\Program Files (x86)\Common Files\System\OLE DB\)
OpenDSLFile C:\USERS\the_name_of_user\desktop\Test_UDL_x86.UDL is asked to open the UDL file “special 32-bit” in my case named Test_UDL_x86.udl.

And that’s what you get:

You will note in particular the Microsoft Jet OLEDB 4.0 provider – so dear to the users of Access.

Again, this provider is only 32-bits.

You will also notice the presence of ACE.OLEDB.12.0 (just below the Jet) who is the new Jet engine – now prefer to Jet.

The original post in French by Axel Guerrier.

, , , , ,

No comments yet.

Leave a Reply