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

Database in Memory Card

Discuss OrbForms Designer and PocketC Architect

Postby orbFan on Sun Jan 29, 2006 1:00 pm

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;
}
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines

Postby mgreen on Sun Jan 29, 2006 2:47 pm

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.
-----
Michael Green
mgreen
 
Posts: 72
Joined: Fri Mar 14, 2003 9:40 pm
Location: USA

Postby orbFan on Sun Jan 29, 2006 9:20 pm

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.
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines

Postby dewey on Sun Jan 29, 2006 9:58 pm

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.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby orbFan on Mon Jan 30, 2006 9:10 pm

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?
orbFan
 
Posts: 21
Joined: Thu Sep 08, 2005 8:02 am
Location: Philippines


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 4 guests

cron