Post by ReignboyHow can I create .pdb files that I can access from my main
application? (.prc). for example, I have a .prc application. and
from it, I would like to look for certain .pdb files and read/write
from it. How do I create that .pdb?
There are two ways to create a *.pdb file: from within the Palm
application, and from your desktop.
If you want to create a *.pdb file from your desktop computer, you first
create a text file and convert it using the software par.
Thanks! That was very helpful!
How would you create it from within the application? Is it described
in the reference manual? If so, which section? I couldn't find it!
The Palm OS Reference manual is indispensable. It's freely available in
many forms. I find the *.pdf format most convenient.
Part II: System Management -> Data and Resource Manager
UInt16 memcardNo = 0;
const Char *dbName = "MyDatabase";
UInt32 creator = 'MyAp';
UInt32 type = 'DATA';
Boolean resDB = false;
Err error;
error = DmCreateDatabase(memCardNo, dbName, creator, type, resDB);
After creating the database, you must create records in the database, so you
can write/store information to it.
There are two ways to open a database.
DmOpenRef db;
db = DmOpenDatabase(memCardNo, dbID, mode);
db = DmOpenDatabaseByTypeCreator(type, creator, mode);
After opening a database, you read the records.