home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!ox-prg!oxuniv!hsr4
- From: hsr4@vax.oxford.ac.uk
- Newsgroups: bit.listserv.dbase-l
- Subject: Re: Dbase 3 / 3+
- Message-ID: <1992Jul29.143133.7887@vax.oxford.ac.uk>
- Date: 29 Jul 92 13:31:33 GMT
- References: <9207241830.A03431@ius.indiana.edu>
- Organization: Oxford University VAXcluster
- Lines: 55
-
- In article <9207241830.A03431@ius.indiana.edu>, rboyer2@IUS.INDIANA.EDU (RBOYER2) writes:
- > :Can someone tell me where I can find the file format description of a Dbase
- > : 3 / 3+ database file ?
- > :Thanks
- > :
- > :Davei (davei@lancaster.ac.uk)
- >
- > I've been meaning to look these things up for a long time
- > now and just decided I would. They are listed in the
- > Appendix-D of my dBase III+ manual. I'll copy them here for
- > you poor souls without the manual handy.
-
- And they also appear in Appendix C of the Using dBASE III PLUS manual.
-
- >
- > Structure of a Database File Header:
- >
- > Byte
- > Offset Contents Meaning
- > ==========================================================
- > 0 1 byte dBase III version number
- > (03H without a .dbt file)
- > (83H with a .dbt file)
- >
- > 1-3 3 bytes date of last update
- > (YY MM DD)
- >
- > 4-7 32 bit number number of records in data file
-
- [etc]
-
- I too have been looking for details of file structures, but with much finer
- detail than is given in the handbooks. For example, exactly how to interpret
- the values, and what normal ranges might be expected.
-
- I'm slowly finding time to work things through, so I can't give fine detail yet
- (but give me time...).
-
- One thing which has become apparent is that the 32 bit number which lies in
- offset bytes 4-7 doesn't translate as it stands. For example, when I look at
- one of my (problem) .dbf files, the hex values for bytes 4-7 are 3F 91 01 00.
- The direct conversion of that number to decimal gives 1,066,467,584 - which
- isn't the number of known records in the file!
-
- What appears to be necessary is to reverse the sequence of the bytes - so
- 3F 91 01 00 becomes 00 01 91 3F, which turns out to be decimal 102,719 (and
- which also happily is the number of known records in the file).
-
- For some this might be glaringly obvious, but not for others (like me, with
- debugging experience primarily in Texas Instruments environment!).
-
- There may be others lurking. If I find anything really tortuous, I'll let you
- know...
-
- Peter "Hair regrowing nicely, thanks" Brooks
-