Function DbCloseAll() Foundation

Closes all files in all work areas.

Syntax
DbCloseAll() --> NIL
Return

The return value of DbCloseAll() is always NIL.

Description

All files in all work areas are closed by the database function DbCloseAll(). All open file buffers are written into the files before they are closed. The function is generally used when all files are to be closed before the end of an application. Files can also be closed using the function DbCloseArea(), but this function must be called explicitly for each work area.

The command CLOSE DATABASES can be used instead of DbCloseAll().

Examples
DbCloseAll()
// In the example, three database files are opened and then 
// closed with DbCloseAll(). 

PROCEDURE Main 
   ? Select()                  // result: 1 

   USE Customer NEW 
   ? Select()                  // result: 1 

   USE Invoice NEW 
   ? Select()                  // result: 2 

   USE InvItem NEW 
   ? Select()                  // result: 3 

   DbCloseAll() 
   ? Select()                  // result: 1 

RETURN 

Feedback

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.