Can I can connect a 32-bit application to a 64-bit ODBC driver?

Yes, you can connect a 32-bit application to a 64-bit ODBC driver by using the ODBC-ODBC Bridge.

Without the ODBC-ODBC Bridge, a 32-bit application can't connect to a 64-bit ODBC driver. 32-bit applications must be linked against 32-bit libraries. For this reason, 32-bit applications can only link against a 32-bit ODBC Driver Manager library. 32-bit ODBC Driver Managers can only load 32-ODBC drivers.

The ODBC-ODBC Bridge is a client/server product. The ODBC-ODBC Bridge client is not linked against the ODBC-ODBC Bridge server. The ODBC-ODBC Bridge client communicates with the ODBC-ODBC Bridge server by using the Remote Procedure Call (RPC) mechanism. You can use a 32-bit ODBC-ODBC Bridge client with a 64-bit ODBC-ODBC Bridge server and vice versa.

To connect a 32-bit application with a 64-bit ODBC driver, you use a 32-bit ODBC-ODBC Bridge client and a 64-bit ODBC-ODBC Bridge server.

ODBC calls made by your 32-bit application are passed from the 32-bit ODBC driver (the ODBC-ODBC Bridge client) to the target 64-bit ODBC driver through the 64-bit ODBC-ODBC Bridge server.

Example: How to connect a 32-bit application to a 64-bit ODBC driver

The following steps show how to access a 64-bit ODBC driver from a 32-bit application on a 64-bit Windows machine. The ODBC driver is the Microsoft SQL Native Client driver. The application is Visual Studio 2010.

  1. In the 64-bit ODBC Data Source Administrator, configure a system data source for the SQL Native Client driver.

    To access the 64-bit ODBC Data Source Administrator, enter the following command in the Windows Run dialog box:

    odbcad32.exe
  2. Install the 64-bit Windows ODBC-ODBC Bridge distribution.

    Accept the Default option during Setup, which will install both the ODBC-ODBC Bridge client and server components.

  3. In the Windows Services dialog box:
    1. Stop the 32-bit ODBC-ODBC Bridge server service (Easysoft ODBC-ODBC Bridge Server).
    2. Start the 64-bit ODBC-ODBC Bridge server service (Easysoft ODBC-ODBC Bridge Server x64).
  4. In the 32-bit ODBC Data Source Administrator, configure an ODBC-ODBC Bridge client data source that points to the SQL Native Client driver data source.

    To access the 32-bit ODBC Data Source Administrator, enter the following command in the Windows Run dialog box:

    %windir%\syswow64\odbcad32.exe
  5. In a Visual Studio 2010 project, choose Data menu > Add New Data Source.

    The Data Source Configuration Wizard starts.

  6. Select Database on the Choose a Data Source Type page.
  7. Select Dataset on the Choose a Data Model page.
  8. Select New Connection on the Choose Your Data Connection page.
  9. In the Choose a Data Source dialog box, select Microsoft ODBC data source.
  10. In the Add Connection dialog box, choose your ODBC-ODBC Bridge client data source from the Use user or system data source name list.
  11. Complete the remainder of the Data Source Configuration Wizard.

Further information