xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RecSize()

Retrieves the number of bytes required to store a database record.

Syntax

RecSize() --> nBytes

Return

The function returns a numeric value indicating the record length, or number of bytes required to store a record in a database open in a work area. If no database is open in the work area, the return value is zero.

Description

RecSize() is an informational database function used to determine the record length of the database open in a work area. The record length refers to the number of bytes a database file grows when a new record is added to the database with APPEND BLANK.

Info

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

Example

// The example implements a user-defined function which calculates
// the file size of a DBF file.

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

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