xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Header()

Returns the size of the database file header.

Syntax

Header() --> nBytes

Return

The function returns the number of bytes occupied by the file header of a database open in a work area, or zero if the work area is unused.

Description

The database function Header() is used in conjunction with LastRec() and RecSize() to compute the size of a database file.

Info

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

Example

// The example implements a user-defined function that returns the
// file size of a database.

   PROCEDURE Main

      USE Customer NEW
      ? DbfSize()
      USE
   RETURN

   FUNCTION DbfSize()
   RETURN ( (RecSize() * LastRec()) + Header() + 1 )

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