Microsoft KB Archive/65518

PRB: DB-LIBRARY Programs Fail After Upgrading SQL Server

PSS ID Number: Q65518 Article last modified on 02-03-1994

1.10 1.11 4.20 OS/2

= SYMPTOMS =

After upgrading to a new version of SQL Server, your DB-LIBRARY (db-lib) programs (which used to compile and run correctly) may no longer compile and/or run properly.

= CAUSE =

Your C environment variables may be pointing to the wrong db-lib files. The Microsoft C Compiler uses the INCLUDE and LIB environment variables (among others) during compilation of any C program. INCLUDE stores the path where the various header (.H) files are to be found, and LIB stores the path of the library (.LIB) files. The Microsoft C Compiler searches these paths in order, looking in each directory for the needed files. When it finds the file, it stops looking.

= WORKAROUND =

When you update to a new version of SQL Server, you must make sure that the C compiler uses the new versions of the db-lib files. This includes SQLFRONT.H, SQLDB.H, RLDBLIB.LIB, and RMDBLIB.LIB. Please note that the SQLERROR.H file is no longer used as of SQL Server version 1.1, and that these files have the exact same names from version to version. This is to facilitate standardization of all existing calls, MAKE files, and other development tools. If you have older versions of these db-lib files, be sure they have been overwritten by the new ones; otherwise, the C compiler may find the older versions of these files and use them instead of the newer db-lib files. This could cause a db-lib program to compile correctly (it would seem), but fail at run time. Either delete the older versions of these files or make sure the INCLUDE and LIB paths do not point to the older versions of these files. You also may be using the older versions of these db-lib files that are included with SQL Server versions 1.1 and later so that your existing programs can run without modification. The naming conventions are listed in Appendix A, “Upgrading from Version 1.0” in the “Microsoft SQL Server Installation Guide.” The following is a list of the naming conventions:

Old Name New Name Environment
LDBLIBR.LIB RLDBLIB.LIB MS-DOS, large model MDBLIBR.LIB RMDBLIB.LIB MS-DOS, medium model DBLIBP.DLL PDBLIB.DLL OS/2 systems, dynamic-link library DBLIBP.LIB PDBLIB.LIB OS/2 systems, import definitions DBLIBW.EXE WDBLIB.EXE Windows (version 2.1), dynamic-link library DBLIBW.LIB WDBLIB.LIB Windows (version 2.1), import definitions None DBNMPP.DLL Named pipe dynamic-link library

For more information, refer to Appendix E, “Building Applications,” in the “Microsoft SQL Server Programmer’s Reference.”

= Additional reference words: 1.10 1.11 4.20 dblib =

Copyright Microsoft Corporation 1994.