Page 1 of 1

PostPosted: Sun Jan 29, 2006 1:00 pm
by orbFan
I found out that my application can <b>ONLY</b> read a database if the pdb file is in the palm's main memory. If transferred to the memory card (for decongestion purposes), the database would become inaccessible. Only upon relocating the pdb file back to the main memory would I be able to read the database.

I thought <b><u></u></b> would do its job. The help file did state that this command searches for database in available cards and in the palm's built-in RAM.

Maybe there is something wrong with my source code. Somebody please help me out.

Here's my source code (same as the sample files):

bool RecordManager.readRecord(){
Database db;
DBRecord rec;
bool bRet = false;

if("Test Values", false)){
if(db.getrec(appPrefs.iRecord, rec, true)){, typeof(testItem), 1);
nRecords = db.nrecs;
recordNum.recNum = db.nrecs;
bRet = true;
return bRet;

PostPosted: Sun Jan 29, 2006 2:47 pm
by mgreen
Try copying the database to the '/Palm/Launcher' directory on your memory card. The database functions only look in specific locations on the card. Under OS5, you could try putting the database into '/Documents', but I haven't tried that myself.

PostPosted: Sun Jan 29, 2006 9:20 pm
by orbFan
I still can't read my database even though I did transfer the pdb file on different folders of my memory card. The folders are:
1. Card/PALM/programs/BBVFS
2. Card/PALM/programs/DXTG
3. Card/PALM/Launcher
4. Card/PALM/Documents
5. Card/PALM/Audio
7. Card/PALM/

The database is accessible only if I re-transfer the pdb file back to the palm's internal memory. BTW, my device is a Tungsten T3. I am using a Multimedia Card (MMC) for extra storage.

Thanks for seeing my concern.

PostPosted: Sun Jan 29, 2006 9:58 pm
by dewey
A "card" is a Palm OS concept referring to multiple memory cards built into the device. No current devices support multiple cards.

The Palm OS does not support opening a database directly from a VFS card. However, you can import and export a database between main memory and VFS. You can also open a record from a VFS database in read-only mode using File.getRec or File.getRes.

PostPosted: Mon Jan 30, 2006 9:10 pm
by orbFan
Thanks Dewey. Looks like there is still a lot to learn.

Can you please post a sample source code on how to use File.getRec or File.getRes? I haven't found one in the orbforms sample.

My other questions:
1. Would this command not get in conflict with
2. What will happen to <b>File.getRec</b> if the user places the database into the palm's internal memory, or to <b></b> if the user transfers the database back to the memory card?