Microsoft KB Archive/167182

From BetaArchive Wiki

PRB: FPSQL Compiles With SET LIBRARY TO Instead Of Loading

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:

Q101052 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:

Q153525 SAMPLE: Flltest.exe Determines If FLL File Loads Successfully

Additional query words:

Keywords          : kbtool FoxWin FxenvOs FxtoolCk 
Version           : 2.5 2.5a 2.5b 2.6 2.6a
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: August 20, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.