Discussion:
Creating a .pdb file
(too old to reply)
Reignboy
2003-07-21 19:18:49 UTC
Permalink
Hi all,

How 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?

thanks!
Reignboy
2003-07-25 02:16:32 UTC
Permalink
How 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!
Arctic Wolf
2003-07-26 02:47:28 UTC
Permalink
Post by Reignboy
How 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.

Loading...