Microsoft KB Archive/167182

{|
 * width="100%"|

-

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
 Copy the Fpsql.fll file from the FoxPro for Windows Connectivity Kit disK #1 if it isn't already in the FoxPro folder. Verify that the Odbc.dll is not in the Windows\System folder.  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. 