SET BRSTATUS

Header()

This function tells you the size of a table header. The header contains definition information for the table.

Usage

nHeaderSize = HEADER( [ cAlias | nWorkArea ] )
You can get the header size of any open table by passing the alias or work area. Visual FoxPro tables have much larger headers than tables from older versions of FoxPro. For details on header contents, see "DBF, FPT, CDX, DBC—Hike!"

You can combine the result of HEADER() with record size information from RECSIZE() and the record count from RECCOUNT() to determine the space requirements of a table.

Example

CREATE TABLE Test (CharFld C(1),NumFld N(1)) ? HEADER()      && Returns 360   * Determine space requirements for Customer: * Header length plus the size of one record, times * the number of records, plus one byte for a  * terminating Ctrl+Z if any records exist. USE Customer nSpaceNeeded = HEADER() + RECCOUNT() * RECSIZE() + ;     SIGN(RECCOUNT())

See Also

AFields(), FCount(), FSize(), RecCount(), RecSize()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net