xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbCloseArea()

Closes a database file in a work area.

Syntax

DbCloseArea() --> NIL

Return

The return value is always NIL.

Description

The DbCloseArea() function closes the database open in the current work area and all associated files, like index or memo files. Use an aliased expression to close a database in a different work area.

Closing a database causes all pending file buffers being flushed to disk before files are closed. Also, all file and record locks are released when files are closed.

Info

See also:CLOSE, DbCloseAll(), DbCommit(), DbUseArea(), USE
Category: Database functions
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

   PROCEDURE Main()
      USE Customer ALIAS Cust
      ? (1)->(Used())                  // result: .T.

      DbEdit()

      Cust->(DbCloseArea())

      ? (1)->(Used())                  // result: .F.
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe