Ben Combee wrote:

At 10:40 AM 10/1/2005, you wrote:

   Hi,

I'm writing a program to send databases through a network connection. It's working fine with simple palm databases, but I get a strange behavior with resource databases. When I open a PRC, seems that it overwrites my program's resources with the ones defined in the PRC file. For example, if I have an Alert with a string and try to show it with a PRC database opened, my program shows another alert, which is defined in the PRC file. Simply opening a resource database will 'register' its resources, overwriting mine own resources? Is there a way to avoid this behavior?


After opening the resource database, reopen your application's database. That will put it back on top of the resource list -- however, if there are resource conflicts, you'll get your apps resources instead of the new DB's resources.

This problem of an implicit list of resources was fixed in Palm OS Cobalt's Protein API, but there's no good way to handle this in the standard Palm OS API.

   Ok Ben, thanks for the help.
Another question: What's the easier way to simply copy the databases' contents (from the PDA's memory, not from a expansion card) to a remote server, so that I can reconstruct the database as files? Since Palm's files are not contiguos in memory, I believe the only way is to get the number of records and iterate through them, sending record by record, right? In this case, can I handle PRCs and PDBs in the same way? I mean, can I use DmNumRecords and DmQueryRecord to read PRC's records, or should I use DmNumResources, DmGet1Resource?

   Thanks again,
   Luciano



-- Ben Combee, Senior Software Engineer, Palm, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Forum Archives:   http://news.palmos.com/read/all_forums/




--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to