Hello. I am trying to write a program that will read and write
PalmOS database files. Unfortunately none of the tools
currently available meet my needs (or don't work with PB) so I
am going to write my own. However, file formats are not my
strong suit. Below is the format to .PDB files that the Palm
devices use. Can someone point me in the right direction on
how to read these from PB?
A .pdb file consists of a Database Header (78 bytes) followed
by a table of Record Entry Headers (one for each database
record). The data for all records follows the table of Record
Entry Headers.
--- Database Header (78 bytes) ---
Field Bytes Value
----- ----- -----
DB Name 32 <Database Name>
Flags 2 $00, $00
Version 2 $00, $00
Creation Time 4 $06, $D1, $44, $AE
Modificaton Time 4 $06, $D1, $44, $AE
Backup Time 4 $00, $00, $00, $00
Modification Number 4 $00, $00, $00, $00
App Info Offset 4 $00, $00, $00, $00
Sort Info Offset 4 $00, $00, $00, $00
Type 4 <Database ID>
Creator 4 <Application ID>
unique ID seed 4 $00, $00, $00, $00
next record list id 4 $00, $00, $00, $00
Number of records 2 <Number of Records>
--- Record 0 Entry Header (8 bytes) --- (One entry for each record)
Field Bytes Value
----- ----- -----
Offset 4 <offset to record 0 from the beginning of the file>
Record attrib (1 byte)
& unique ID (3 bytes) 4 $40, $6F, $80, $00
.
.
.
--- Record n Entry Header (8 bytes) --- (One entry for each record)
Field Bytes Value
----- ----- -----
Offset 4 <offset to record n from the beginning of the file>
Record attrib (1 byte)
& unique ID (3 bytes) 4 $40, $6F, $80, $00
--- Record 0 Data --- (One entry for each record)
.
.
.
--- Record n Data --- (One entry for each record)
--- End of File ----
PalmOS database files. Unfortunately none of the tools
currently available meet my needs (or don't work with PB) so I
am going to write my own. However, file formats are not my
strong suit. Below is the format to .PDB files that the Palm
devices use. Can someone point me in the right direction on
how to read these from PB?
A .pdb file consists of a Database Header (78 bytes) followed
by a table of Record Entry Headers (one for each database
record). The data for all records follows the table of Record
Entry Headers.
--- Database Header (78 bytes) ---
Field Bytes Value
----- ----- -----
DB Name 32 <Database Name>
Flags 2 $00, $00
Version 2 $00, $00
Creation Time 4 $06, $D1, $44, $AE
Modificaton Time 4 $06, $D1, $44, $AE
Backup Time 4 $00, $00, $00, $00
Modification Number 4 $00, $00, $00, $00
App Info Offset 4 $00, $00, $00, $00
Sort Info Offset 4 $00, $00, $00, $00
Type 4 <Database ID>
Creator 4 <Application ID>
unique ID seed 4 $00, $00, $00, $00
next record list id 4 $00, $00, $00, $00
Number of records 2 <Number of Records>
--- Record 0 Entry Header (8 bytes) --- (One entry for each record)
Field Bytes Value
----- ----- -----
Offset 4 <offset to record 0 from the beginning of the file>
Record attrib (1 byte)
& unique ID (3 bytes) 4 $40, $6F, $80, $00
.
.
.
--- Record n Entry Header (8 bytes) --- (One entry for each record)
Field Bytes Value
----- ----- -----
Offset 4 <offset to record n from the beginning of the file>
Record attrib (1 byte)
& unique ID (3 bytes) 4 $40, $6F, $80, $00
--- Record 0 Data --- (One entry for each record)
.
.
.
--- Record n Data --- (One entry for each record)
--- End of File ----
Comment