xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

LUpdate()

Returns the last modification date of a database open in a work area.

Syntax

LUpdate() --> dLastChange

Return

The function returns the date of the last change applied to a database fiel open in a work area. If the work area is unused, an empty date is returned.

Description

LUpdate() returns the date of the last change applied to a database file in a work area. This information is stored in the header of a database file and is only updated when the file is closed.

Info

See also:DbInfo(), FCount(), FieldName(), Header(), LastRec(), RecSize()
Category: Database functions
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The function illustrates that the last modification date
// is only updated when a database file is closed.

   PROCEDURE Main
      USE Customer ALIAS Cust NEW EXCLUSIVE

      ? DtoS(Date())           // result: 20060324
      ? DtoS(LUpdate())        // result: 20060103

      REPLACE Cust->LastNamet WITH "Miller"

      ? DtoS(LUpdate())        // result: 20060103

      CLOSE Cust

      USE Customer NEW
      ? DtoS(LUpdate())        // result: 20060324

      CLOSE ALL
   RETURN

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