Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Database in Memory Card
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>database.open</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(db.open("Test Values", false)){
if(db.getrec(appPrefs.iRecord, rec, true)){
rec.read(&testItem, typeof(testItem), 1);
rec.close();
nRecords = db.nrecs;
recordNum.recNum = db.nrecs;
bRet = true;
}
db.close();
}
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
6. Card/PALM/DCIM
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 Database.open?
2. What will happen to <b>File.getRec</b> if the user places the database into the palm's internal memory, or to <b>Database.open</b> if the user transfers the database back to the memory card?