Microsoft KB Archive/67872

INF: Writing Large Model Windows/SQL Server DB-LIBRARY Apps

PSS ID Number: Q67872 Article last modified on 12-18-1992

1.10 1.11 4.20 WINDOWS

Summary: To develop a large memory model application for Windows version 3.0 or 3.1 that accesses SQL Server, you must first obtain DB-LIBRARY (db-lib) version 1.16 or later. This version of db-lib contains the SQLDB.H header file necessary for large model Windows programs. However, you must also modify the application code as follows: 1. Change all uses of “DBPROCESS” to “DBPROCESS near”. This includes private type declarations, db-lib parameter declarations, type casting, and so forth. For example DBPROCESS dbproc = (DBPROCESS ) NULL; should be changed to the following: DBPROCESS near dbproc = (DBPROCESS near ) NULL; 2. Change all uses of “LOGINREC” to “LOGINREC near”. This includes private type declarations, db-lib parameter declarations, type casting, and so forth. For example static LOGINREC LoginRec; should be changed to the following: static LOGINREC near LoginRec; 3. Use the correct C library and Windows library functions. 4. Compile the program with the -Al switch. This tells the C compiler to compile the program into a large model application. In the Software/Data Library, there is a modified SQLTEST3 sample application for large model. SQLTEST3 can be found in the Software/Data Library by searching on the word SQLTEST3, the Q number of this article, or S13236. SQLTEST3 was archived using the PKware file-conversion utility.

= Additional reference words: 1.10 1.1 1.11 3.00 3.10 dblib =

Copyright Microsoft Corporation 1992.