Function DbeUnload() Foundation

Removes a loaded database engine (DBE) from main memory.

DbeUnload( <cDBEname> ) --> lSuccess
<cDBEname> is a character string containing the name of the database engine (DBE) to release.

The return value of DbeUnload() is .T. (true) if the specified DBE could be removed from memory. Otherwise it is .F. (false).


The function DbeUnload() removes a database engine (DBE) from memory when it is no longer needed. No file can be open in any work area managed by this DBE. The command CLOSE DATABASES should be executed, if necessary, before the call to DbeUnload(). If one or more files dependent on the DBE are still open, the DBE cannot be released.

If the DBE to be released is a component DBE, no compound DBE can still exist containing this component DBE.

In Xbase++, DBEs can be loaded as required at runtime and then released. Loading occurs using the function DbeLoad() which is the counterpart of DbeUnload(). Using DBEs, an Xbase++ application can access different file formats (see the chapter "The Xbase++ Database Engine"in the Xbase++ documentation).

Release a database engine

// In the example, the SDFDBE is loaded to export data from 
// a DBF database file into an ASCII file in the SDF format. 
// After the operation, the SDFDBE is no longer needed 
// and is removed from memory using DbeUnload(). 

   LOCAL cOldDbe 

   ? DbeSetDefault()                    // result: DBFNTX 

   USE Customer                         // open CUSTOMER.DBF 

                                        // copy to ASCII file 
                                        // (System Data Format) 
   DbeUnload( "SDFDBE" )                // release SDF Engine 

   CLOSE Customer 


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.