Microsoft KB Archive/37667

-

The information in this article applies to:


 * Microsoft SQL Server Programmer's Toolkit, version 4.2

-

SYMPTOMS
DB-Library (DB-Lib) programs compiled with /Zp (pack structure members) can produce General Protection Faults (GP-Faults) and unpredictable results. The problem seems to be limited to DB-Lib macros such as dbcurrow, dbfirstrow, and dbrowtype.

CAUSE
DB-Lib has been compiled with default structure alignment. If the user program is compiled with an incompatible pack option, DB-Lib macros will be generated with incorrect offsets, resulting in unpredictable results.

WORKAROUND
If the user program must be compiled with /Zp, the problem can be circumvented by putting pragma statements around the include for &quot;sqldb&quot; to force word alignment offsets to be generated when DB-Lib macros reference that structure.

Additional query words: dblib

Keywords : kbprg SSrvDB_Lib

Version : WINDOWS:4.2

Platform : WINDOWS

Issue type :