PRB: Microsoft 32-Bit ODBC Drivers Cannot Be Used from 16-Bit Applications (237388)



The information in this article applies to:

  • Microsoft Data Access Components 1.5, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 95
  • Microsoft Data Access Components 2.0, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 95
  • Microsoft Data Access Components 2.1, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 95
  • Microsoft Data Access Components 2.5, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 95
  • Microsoft Data Access Components 2.6, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 95

This article was previously published under Q237388

SYMPTOMS

The Microsoft 32-bit ODBC drivers fail when called from a 16-bit application through the ODBC thunking layer. Particularly under Windows 95 and Windows 98, you will not be able to connect without the application failing.

CAUSE

The Microsoft 32-bit ODBC drivers were not designed or tested to be used from 16-bit applications. Furthermore, drivers, such as the Access and SQL server drivers, create multiple threads, which thunking in Windows 95 and Windows 98 doesn't support.

RESOLUTION

If you need to access databases using the newer 32-bit ODBC drivers from a 16-bit application, you cannot do it directly. You will need to take the database access portion out of the 16-bit application. Build a brand new 32-bit application that will perform the database access. Then you can re-code your 16-bit application to use interprocess communication such as Sockets, DDE, and OLE Automation in order to transfer data to and from new 32-bit application.

As it might turn out to be too much work, perform the above steps only if you have huge 16-bit application and data access is only a small part of it. If you have a smaller 16-bit application, it is best to reprogram and rebuild the application with the 32-bit version of Visual C++.
The 16-bit SQL Server ODBC driver, which is included with SQL Server 6.5 can be used against SQL Server 7.0, although you will have some limitations, such not being able to use the new SQL 7.0 data types.

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:12/5/2003
Keywords:kbDatabase kbprb KB237388 kbAudDeveloper