home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / bit / listserv / dbasel / 930 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.6 KB  |  38 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!wupost!ukma!psuvax1!psuvm!auvm!INDYVAX.BITNET!DSMITH
  3. X-Envelope-to: DBASE-L@NMSUVM1.BITNET
  4. X-VMS-To: IN%"DBASE-L@NMSUVM1.BITNET"
  5. X-VMS-Cc: DSMITH
  6. MIME-version: 1.0
  7. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  8. Content-transfer-encoding: 7BIT
  9. Message-ID: <01GOJ9CDW5J6002H1X@INDYVAX.IUPUI.EDU>
  10. Newsgroups: bit.listserv.dbase-l
  11. Date:         Tue, 8 Sep 1992 08:13:36 -0500
  12. Sender:       "Discussion on the use of the dBase language and related
  13.               dialects" <DBASE-L@NMSUVM1.BITNET>
  14. From:         DON SMITH <DSMITH@INDYVAX.BITNET>
  15. Subject:      Re: dbase questions + ASCII --> dbase
  16. Lines: 20
  17.  
  18. Maarten -
  19.    The number of records in a .DBF file is indeed stored in the header, in
  20. bytes 4-7 (start counting with 0).  But as far as interpreting those bytes,
  21. they are stored in hexadecimal in that PC-peculiar "back-words" format, or
  22. whatever you want to call it.  The proper order for us humans is byte 7 - byte
  23. 6 - byte 5 - byte 4.
  24.  
  25.    For example, a .DBF with 1044 records will have
  26.       14 04 00 00      stored in those bytes
  27.    Rearrange to  00 00 04 14  and convert to decimal...
  28.      (4 x 256) + (1 x 16) + (4 x 1) = 1044
  29.  
  30.    As far as efficiency of storage goes, yes, it does waste space to store a
  31. 10-character last name in 20 spaces, but it undoubtedly is simpler in the long
  32. run.  Otherwise, imagine the convolutions in trying to edit the improperly
  33. spelled "Marten" to "Maarten" if the most storage-efficient methods were used.
  34. So there are tradeoffs either way.  Simplicity has its virtues, especially if
  35. you're trying to put a damaged file back together!
  36.  
  37. Don Smith
  38.