home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / dbase / dbasefil.inf < prev    next >
Text File  |  1994-03-07  |  4KB  |  74 lines

  1.  
  2. Database file structure
  3.  
  4. The structure of a dBASE III database file is composed of a header
  5. and data records.  The layout is given below.
  6.  
  7.  
  8. dBASE III DATABASE FILE HEADER:
  9.  
  10. +---------+-------------------+---------------------------------+
  11. |  BYTE   |     CONTENTS      |          MEANING                |
  12. +---------+-------------------+---------------------------------+
  13. |  0      |  1 byte           | dBASE III version number        |
  14. |         |                   |  (03H without a .DBT file)      |
  15. |         |                   |  (83H with a .DBT file)         |
  16. +---------+-------------------+---------------------------------+
  17. |  1-3    |  3 bytes          | date of last update             |
  18. |         |                   |  (YY MM DD) in binary format    |
  19. +---------+-------------------+---------------------------------+
  20. |  4-7    |  32 bit number    | number of records in data file  |
  21. +---------+-------------------+---------------------------------+
  22. |  8-9    |  16 bit number    | length of header structure      |
  23. +---------+-------------------+---------------------------------+
  24. |  10-11  |  16 bit number    | length of the record            |
  25. +---------+-------------------+---------------------------------+
  26. |  12-31  |  20 bytes         | reserved bytes (version 1.00)   |
  27. +---------+-------------------+---------------------------------+
  28. |  32-n   |  32 bytes each    | field descriptor array          |
  29. |         |                   |  (see below)                    | --+
  30. +---------+-------------------+---------------------------------+   |
  31. |  n+1    |  1 byte           | 0DH as the field terminator     |   |
  32. +---------+-------------------+---------------------------------+   |
  33.                                                                     |
  34.                                                                     |
  35. A FIELD DESCRIPTOR:      <------------------------------------------+
  36.  
  37. +---------+-------------------+---------------------------------+
  38. |  BYTE   |     CONTENTS      |          MEANING                |
  39. +---------+-------------------+---------------------------------+
  40. |  0-10   |  11 bytes         | field name in ASCII zero-filled |
  41. +---------+-------------------+---------------------------------+
  42. |  11     |  1 byte           | field type in ASCII             |
  43. |         |                   |  (C N L D or M)                 |
  44. +---------+-------------------+---------------------------------+
  45. |  12-15  |  32 bit number    | field data address              |
  46. |         |                   |  (address is set in memory)     |
  47. +---------+-------------------+---------------------------------+
  48. |  16     |  1 byte           | field length in binary          |
  49. +---------+-------------------+---------------------------------+
  50. |  17     |  1 byte           | field decimal count in binary   |
  51. +---------+-------------------+---------------------------------+
  52. |  18-31  |  14 bytes         | reserved bytes (version 1.00)   |
  53. +---------+-------------------+---------------------------------+
  54.  
  55.  
  56. The data records are layed out as follows:
  57.  
  58.      1. Data records are preceeded by one byte that is a space (20H) if the
  59.         record is not deleted and an asterisk (2AH) if it is deleted.
  60.  
  61.      2. Data fields are packed into records with  no  field separators or
  62.         record terminators.
  63.  
  64.      3. Data types are stored in ASCII format as follows:
  65.  
  66.      DATA TYPE      DATA RECORD STORAGE
  67.      ---------      --------------------------------------------
  68.      Character      (ASCII characters)
  69.      Numeric        - . 0 1 2 3 4 5 6 7 8 9
  70.      Logical        ? Y y N n T t F f  (? when not initialized)
  71.      Memo           (10 digits representing a .DBT block number)
  72.      Date           (8 digits in YYYYMMDD format, such as
  73.                     19840704 for July 4, 1984)
  74.