ACC: Description of Btrieve/Xtrieve .DDF filesID: Q113877
|
Moderate: Requires basic macro, coding, and interoperability skills.
Btrieve database files (which usually have .DAT extensions) consist of a
header page, multiple index pages, and multiple data pages. With the
exception of index fields located in the header page, none of these items
include any information about the data types or the locations of the fields
in the Btrieve database file. Also, while the header page contains
information about the number and types of indexes, it does not contain any
information about the non-index parts of the record. Because Microsoft
Access and Microsoft Visual Basic require specific information about each
field, they must use .DDF files, which contain the databases' data
dictionary information, to obtain this information.
There are seven available .DDF files: FILE.DDF, FIELD.DDF, INDEX.DDF,
ATTRIB.DDF, VIEW.DDF, USER.DDF, and RIGHTS.DDF. Microsoft Access version
2.0 requires only FILE.DDF and FIELD.DDF. Microsoft Access can maintain the
INDEX.DDF file for interoperability with Xtrieve, but the default is not to
maintain it.
When you are using .DDF files with Microsoft Access, bear the following in
mind:
Xf$ID Xf$Name Xf$Loc Xf$Flags
--------------------------------------------------
1 x$File C:\MYDIR\FILE.DDF 16
2 x$Field C:\MYDIR\FIELD.DDF 16
3 x$Index C:\MYDIR\INDEX.DDF 16
4 TestFile TEST.DAT 0
5 Datafile Q:\PUBLIC\DATA.DAT 0
6 MyData MOREDATA\MYDATA.BTV 0
FieldName Description DataType Position Length
-----------------------------------------------------------
Xf$ID File ID Integer 1 2
Xf$Name File Name String 2 20
Xf$Loc File Location String 23 64
Xf$Flags File Flags* Integer 87 1
Xe$Id Xe$File Xe$Name Xe$DataType Xe$Offset Xe$Size Xe$Dec Xe$Flags
-------------------------------------------------------------------
1 1 Xf$Id 1 0 2 0 0
2 1 Xf$Name 0 2 20 0 0
3 1 Xf$Loc 0 22 64 0 0
4 1 Xf$Flags 1 86 1 0 0
5 2 Xe$Id 1 0 2 0 0
6 2 Xe$File 1 2 2 0 0
7 2 Xe$Name 0 4 20 0 0
8 2 Xe$DataType 1 24 1 0 0
9 2 Xe$Offset 1 25 2 0 0
10 2 Xe$Size 1 27 2 0 0
11 2 Xe$Dec 1 29 1 0 0
12 2 Xe$Flags 1 30 2 0 0
13 3 Xi$File 1 0 2 0 0
14 3 Xi$Field 1 2 2 0 0
15 3 Xi$Number 1 4 2 0 0
16 3 Xi$Part 1 6 2 0 0
17 3 Xi$Flags 1 8 2 0 0
18 4 nCounter 1 0 4 0 1
19 4 stUnique 0 4 15 0 1
20 4 stDup 0 19 15 0 1
21 4 rNumb 2 34 4 0 0
22 5 nCustNumb 1 0 4 0 0
23 5 stName 0 4 15 0 1
24 5 stAddress 0 19 20 0 1
25 5 stCity 0 39 20 0 1
26 6 nCustNumb 1 1 4 0 0
27 6 rBalanceDue 1 1 8 0
FieldName Description DataType Position Length
----------------------------------------------------------
Xe$ID Field Id Integer 1 2
Xe$File File Id from Integer 3 2
FILE.DDF
Xe$Name FieldName String 5 20
Xe$DataType Btrieve Integer 25 1
DataType
Xe$Offset Offset Integer 26 2
Xe$Size Field size Integer 28 2
Xe$Dec Decimal places Integer 30 1
Xe$Flags Bit0=Case flag Integer 31 2
for strings
Additional query words: importing exporting linking attaching
Keywords : kb3rdparty IsmBtrv
Version : 1.0 2.0
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 3, 1999