Microsoft KB Archive/67593

INF: Windows Db-libs Under Large Model Require Revised SQLDB

PSS ID Number: Q67593 Article last modified on 03-31-1994

1.10 OS/2

= SUMMARY =

For versions of DB-LIBRARY (db-lib) earlier than 1.16, to use Windows dblib under large model, certain variables must be coerced to a type of NEAR. The file SQLDB in the Software/Data Library contains a revised version of the SQLDB.H file that shows what changes are required to make your code work correctly. All of the changes in this file are under the DBMSWIN ifdef section; however, the entire header file has been included to make it easier to cut and paste. The NEAR coercion is required because the libraries have been built under medium model (W3DBLIB.DLL and W3DBLIB.LIB). This means that they pass back 16-bit (near) pointers. If the program is built under large model, it is making far calls, and therefore expects 32-bit (FAR) pointers. The near coercion of the prototype overrides the large model’s assumption of far calls. Use this modified header file in place of the original SQLDB.H file. SQLDB.EXE can be found in the Microsoft Software Library on GEnie, CompuServe, and Microsoft OnLine by searching on the word SQLDB.EXE, the Q number of this article, or S12828. SQLDB.EXE is a compressed, self-extracting file. After you download the file, run it to extract the file(s) it contains. Note: DB-LIBRARY versions 1.16 and later contain a revised SQLDB.H header file that allows large model compilation.

= Additional reference words: 1.10 dblib =

Copyright Microsoft Corporation 1994.