<alert comment="newbie using CW9.3>
The app I'm working on has a read-only 4mb .pdb comprised of about 1200
records. I used a "tweaked" version of the par utility to build the BigDb.pdb
and to give it the attribute of "readonly" (which is PRC_FLAGS_READONLY == 2).
When I did this, the DmOpenDatabaseByTypeCreator seemed to suceed, but the call
to DmNumRecords returned 0. With the attrribute left at 0, it correctly reports
the actual number of records.
Here is a snippet of the source code:
DmOpenRef dbRef = DmOpenDatabaseByTypeCreator('CHAP',
......................appFileCreator, dmModeReadOnly);
if (dbRef == NULL) {
..return;
}
UInt16 numumRecords = DmNumRecords(dbRef);
The reason I ask: when I use HotSync to transfer the ReadBigDb.prc app to an
actual device, it seems to always do a lengthy backof the BibDb.pdb file ...
even when I am just providng a new ReadBigDb.prc executable. This really bogs
down development.
Am I doing something wrong, or leaving out a step? Once installed, the
BigDb.pdb file doesn't change so I wouldn't think the HotSync back would be
required each time. I thought maybe the attribute "readonly" would prevent that
... but then the app doesn't work.
Is there an alternative way to somehow "mark" the BigDb.pdb so HotSync only
does a backup of it the appropriate number of times (perhaps only once after
installed)?
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/