Basics of Palm databases

Palm devices use two types of database files: PRC and PDB (i.e., .prc and .pdb). PRC is used for Palm OS databases that are application programs, and stores resources of the application, while the PDB (Pilot Database) is used for Palm OS databases that contain only data. Both databases have a unique key that is unique for each application. These databases can be manipulated like stream reading and stream writing. It contains an attribute bit called the Backup Bit. Setting this bit indicates that no custom conduit will be backing up the database and that the database should be backed up during the HotSync process. If you create a database on the Palm Pilot and set the Backup Bit, you will find a copy of the database in PDB format in the Backup directory on the computer with which the HotSync was performed.

This application reads a CSV or an XML file and creates a .pdb file.

Major Sections of the PDB File

A PDB file format contains three sections:

Header section

Recordlist section

Datalist section

i. Header Section

The header section contains 78 bytes, containing the name of the database and other information. Also, contained is the ID of the database that is unique for an application (the ID is globally unique, and can be obtained from the Palm OS site), the type of the database, and other attributes. The PDBHeader class is used to create headers.

iii. Data Section

It is the main section to store information related to the records. Each record is separated by a null terminated character ('\0'). The size of each record may vary but the number of columns should be the same.

The PDBGenerator reads two file formats (CSV and XML) and displays data in table format in a DataGrid. This data can be changed. It reads all table data from the XML file and displays table names in a combo box.

License

Share

About the Author

I'm working as Software Engineer at ISF (Islamabad Software Factory) in Pakistan and involves in multiple products having different languages in different phases. My favourite areas are PDA's, Palm's, .Net and webservices......

i have developing one application related sales for palm
using superwaba platform
now using your project when i create pdb same with creater id and database name as per i can use in my apps from csv
(item name, item code,item description, item price)
data in csv like
Tea TT TEst1 12.00
cofee CC Test2 23.00

and read in my apps using superwaba grid it shows an some numbers in first rows inspite of data
i could not understand why?
please help me if you catch me

I've taken your compiled demo, and your source files, run the application and the output file appears to not be valid, I've tried PDB Exploerer (which I've used many times and usually has no trouble opening PDB files) I also tried using PDAT/DB application on a palm pilot and the output file appears to be corrupt?

Thanks in advance!... from other people's comments it's possible I'm doing something wrong.. I don't have Visual C# installed, so I'm just using the demo compiled app, and your source test.csv.

I work in VB.net mostly.. so if anyone has a working version I'd apreciate it!

Hi dude nice article.... , currently I am working on mobile application development using compact framework 2.0 and MS-SQL Server 2005, my requirement is I have few pdb ( Palm OS Database) files in a shared folder of a file server , I need to read the pdb file and dump the data into MS-SQL Server 2005 can you please let me know how to do it or is SQL replication possible ? if so let me know how to do it.