Re: File Size Discrepancies
- From: "Olaf Doschke" <olaf.doschke@xxxxxxxxxxxxxxxx>
- Date: Mon, 2 Feb 2009 21:20:23 +0100
Hi Lew,
compare HEADER() with the filesize of a newly created
empty DBF, which consists of the header only.
->create table, ?HEADER() then close it with use, before
checking the filesize.
Then add one record and check with HEADER()+1+RECSIZE()
->use the dbf, append blank and use to close before checking
the filesize.
They also could have decided to return 1 more as the result of
HEADER(), but then HEADER() would be wrong for a new DBF.
They could also have decided to add that 1 byte to the header
before the first record is added, but they didn't, although that
extra byte wouldn't even have hurt way back when the dbf format
was founded. but MS didn't invent this, even not Foxsoftware.
So the +1 is the byte between header and the first record, that
is only added to the dbf, when the first record is added.
DBF file size should be
HEADER(), if RECCOUNT()=0
HEADER()+1+RECCOUNT()*RECSIZE(), if RECCOUNT()>0
Bye, Olaf.
.
- References:
- File Size Discrepancies
- From: Lew
- File Size Discrepancies
- Prev by Date: Re: Intermittent File Access Denied
- Next by Date: Re: File Size Discrepancies
- Previous by thread: File Size Discrepancies
- Next by thread: Re: File Size Discrepancies
- Index(es):
Relevant Pages
|