PRB: IM003 Specified Driver Could Not Be Loaded

Last reviewed: June 27, 1995
Article ID: Q119904
The information in this article applies to:
  • Microsoft FoxPro Connectivity Kit, version 2.5
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6

SYMPTOMS

When you are trying to use the DBConnect() function to connect to a data source with the FoxPro Connectivity Kit (CK), the following error message occurs:

   ODBC error IM003(0): [Microsoft][ODBC DLL] Specified driver
   could not be loaded

CAUSE

The required driver .DLL is missing from the WINDOWS\SYSTEM subdirectory.

RESOLUTION

Reinstall the driver from disk.

MORE INFORMATION

The error listed above can be reproduced using the SQL Server driver. FoxPro communicates to SQL Server by going through the following basic ODBC levels:

   FoxPro
   |
   FPSQL.FLL
   |
   ODBC Driver Manager
   (ODBC.DLL)
   |
   ODBC Cursor Library (Optional)
   (ODBCCURS.DLL)
   |
   SQL Server Driver (16-bit)
   (SQLSRVR.DLL)
   |
   Network Library
   (DBNMP3.DLL, DBMSSPX3.DLL, and so on)
   |
   Network Software
   (Microsoft LAN Manager, Novell NetWare, and so on)
   |
   SQL Server DBMS

SQLSRVR.DLL is the driver in this instance. The SQLSRVR.DLL file is located in the WINDOWS\SYSTEM subdirectory. If the SQLSRVR.DLL file is missing, the error message will appear.

The driver's filename can be found by looking in the ODBC.INI file located in the WINDOWS directory. Below is an excerpt from the ODBC.INI file:

   [test]
   Driver=C:\WINDOWS\SYSTEM\sqlsrvr.dll
   Description=
   Server=REDDFOXX

In the example above, "test" is the data source name as it appears in the ODBC Driver Manager. The "driver=" line gives the path and name of the driver that is associated with the data source "test".

Steps to Reproduce Problem

  1. Configure an SQL Server driver with the following information

          Data Source Name: test
          Server: REDDFOXX
    

    where REDDFOXX is the actual name of the SQL Server.

  2. Rename SQLSRVR.DLL to SQLSRVR.BAK. (The SQLSRVR.DLL file is located in the C:\WINDOWS\SYSTEM subdirectory.)

  3. Run the following code:

          * This code assumes that the driver is configured correctly
          * in step 1 and that FPSQL.FLL is in the FoxPro directory.
          SET LIBRARY TO SYS(2004)+"fpsql.fll"
          h=DBConnect("test","sa","")
          errmsg=""
          errval=0
          ?DBError(0,@errmsg,@errval)
          ?errmsg
    

Note that the error message appears.


Additional reference words: FoxWin 2.50a 2.50b 2.50c 2.60 errmsg novel
KBCategory: kbenv kbprb kberrmsg
KBSubcategory: FxtoolCk


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.