PRB: FPSQL Compiles With SET LIBRARY TO Instead Of Loading

Last reviewed: February 10, 1998
Article ID: Q167182
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a on the following platforms: NT, Win95

SYMPTOMS

Issuing the SET LIBRARY TO HOME()+"FPSQL.FLL" command in FoxPro for Windows and then checking to see what library is loaded shows that Fpsql.fxp is the library that is loaded. In other words, the FLL compiles into an FXP file.

In Windows NT, the message "Cannot find ODBC.DLL" may appear.

In FoxPro for Windows 2.5x, the message "Library file is invalid" may be displayed along with the above message.

CAUSE

This is caused by a missing DLL file. Usually the missing DLL file is Odbc.dll but sometimes the FLL could compile if another required DLL is missing from the Windows\System folder.

RESOLUTION

Make sure the Odbc.dll file is located in the Windows\System folder if using Windows 95 or Windows 3.x. If using Windows NT, the Odbc.dll file should be in the WinNT\System folder rather than the WinNT\System32 folder.

STATUS

This behavior is by design. An FLL cannot be loaded if all of the DLLs that it depends on do not exist.

MORE INFORMATION

The Fpsql.fll and Odbc.dll files are provided with the FoxPro Connectivity Kit. The Fpsql.fll is on Disk 1 along with the CKSample.app and some other files. It is not a compressed file so it can be copied directly from the disk. The Odbc.dll is on the ODBC Setup disk. It is a compressed file so setup for ODBC should be run to install it.

Steps to Reproduce Behavior

  1. Copy the Fpsql.fll file from the FoxPro for Windows Connectivity Kit disK #1 if it isn't already in the FoxPro folder.

  2. Verify that the Odbc.dll is not in the Windows\System folder.

  3. In the FoxPro Command window issue the following commands:

          SET LIBRARY TO HOME()+"fpsql.fll"
          ? SET("library")
    

    The path of the FoxPro folder followed by Fpsql.fxp should be displayed on the FoxPro desktop. The DISPLAY STATUS command also showS if the Fpsql.fll file loads as a library or has compiled.

REFERENCES

For additional information on other files installed with the FoxPro Connectivity Kit, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q101052
   TITLE     : Disk Directory and Installation of the Connectivity Kit

For a utility program that can be used to test if a FLL file will load, see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q153525
   TITLE     : SAMPLE: Flltest.exe Determines If FLL File Loads
               Successfully
Keywords          : FoxWin FxenvOs FxtoolCk kbtool
Version           : 2.5 2.5a 2.5b 2.6 2.6a
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


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: February 10, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.