ID: Q112469
The information in this article applies to:
The SET LIBRARY TO command has been changed in FoxPro version 2.6 to allow greater compatibility with the dBASE IV version of this command. However, the version 2.6 Help file incorrectly documents these changes.
The SET LIBRARY TO command has been changed to include the same functionality as dBASE IV version 2.0. In previous versions of FoxPro, the SET LIBRARY TO command was used only to load an API library compiled using the Library Construction Kit (LCK). In version 2.6, the SET LIBRARY TO command can also be used to specify a procedure file. The SET PROCEDURE command remains unchanged and can still be used to specify a procedure file.
If both a SET LIBRARY TO <procedure file> and a SET PROCEDURE TO <procedure file> command are issued, both procedure files will be opened and the procedures within both files will be available for use.
If no extension is provided for the library filename, for example, "SET LIBRARY TO test", FoxPro will search for filenames in the following order:
.PLB or .FLL
.APP
.FXP
.PRG
The Help file is incorrect or incomplete in some areas.
NOTE: The ability to open a procedure file with SET LIBRARY provides compatibility with dBASE IV. Using SET LIBRARY to open a procedure file will close all open API libraries; using SET LIBRARY to open API libraries will close a procedure file opened with SET LIBRARY. Use SET PROCEDURE to open a procedure file and prevent API libraries from being unloaded.
If the SET LIBRARY TO command is used with the ADDITIVE clause, the procedure file will be opened, and the API library will remain loaded.
ADDITIVE
To open additional API libraries, include ADDITIVE after the file
name in successive SET LIBRARY commands. To remove all API libraries
from memory, issue SET LIBRARY TO without including <file name> or
ADDITIVE. To remove an individual library from memory, issue RELEASE
LIBRARY <library name>. The ADDITIVE keyword is ignored when you use
SET LIBRARY to open a procedure file.
The ADDITIVE keyword is not ignored when SET LIBRARY is used to open a procedure file and an API library is loaded. If a procedure file has been loaded, the original procedure file will be closed and the new procedure file will be opened, regardless of whether ADDITIVE is included.
To close a procedure file opened with the SET LIBRARY TO command, issue the SET LIBRARY TO command without including <filename> or ADDITIVE.
Additional reference words: FoxDos FoxWin 2.60 docerr KBCategory: kbprg kbdocerr kb3rdparty KBSubcategory: FxinteropDbase
Last Reviewed: June 28, 1995