Function DbeLoad() Foundation

Loads a database engine (DBE).

DbeLoad( <cDbeFile>,  [<lHidden>] ) --> lSuccess
<cDbeFile> is a character string containing the name of the DLL file holding the database engine.
<lHidden> is a logical expression specifying whether or not a DBE is directly available. The default value is .F. (false) and means that the DBE can be used directly. When <lHidden> contains the value .T. (true), the loaded DBE cannot be set as the default using DbeSetDefault(). "Hidden" DBEs are only used to build other compound DBEs using DbeBuild() and not for data and file management.

DbeLoad() returns the value .T. (true) when the DBE was loaded. Otherwise it returns the value .F. (false).


The function DbeLoad() loads database engines (DBEs) at runtime of an Xbase++ application. It also loads component DBEs needed for the creation of compound DBEs (see the chapter "The Xbase++ Database Engine"in the Xbase++ documentation).

The file name <cDBEFile> does not need to be passed to the function as a complete file name. ".DLL" is used as a default file extension. When no drive or path specifications are included in the file name, a search for the file is performed only in the current directory or in the paths specified with LIBPATH= (OS/2) or PATH= (Windows NT and 95).

When the argument <lHidden> has the value .T. (true), the database engine cannot be used directly to open and manage files. It can only be used for creating compound DBEs. This is done using the function DbeBuild().

Since the DBEs can be dynamically loaded at runtime, an Xbase++ application can access different file formats without knowing ahead of time which files a user wants to access or which file format the files are in. As long as a DBE file containing the database engine with the specific file format desired is available at runtime, the files can be accessed.

Creating the FOXCDX DatabaseEngine

// The example shows a DbeSys() procedure for creating the 
// FOXCDX DatabaseEngine. 

   IF ! DbeLoad( "FOXDBE", .T.) 
      Alert( "FOXDBE not loaded", {"OK"} ) 

   IF ! DbeLoad( "CDXDBE", .T.) 
      Alert( "CDXDBE not loaded", {"OK"} ) 

   IF ! DbeBuild( "FOXCDX", "FOXDBE", "CDXDBE" ) 
      Alert( "Unable to build;" + ; 
             "FOXCDX DatabaseEngine" , {"OK"} ) 

   DbeSetDefault( "FOXCDX" ) 

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.