I want to copy a PDB from the device's RAM (card 0) to a Springboard card, which is a flash ROM module that shows up as Card 1 when inserted into the Handspring device. Though I am able to make a copy of the PDB on Card 1, and have confirmed that it is bitwise equivalent to its origin PDB (on card 0), it fails to be recognized by DmFindDatabase(), as well as the Palm Debugger Console's "Dir 1" command.
Now, I am able manually to burn this PDB into Card 1 by using the Palm-MakeROM.exe utility. This produces a .bin file which I then burn into the flash, and DmFindDatabase() and "Dir 1" find it just fine. My requirement, however, is to copy a PDB from RAM (Card 0) to the Flash ROM (Card 1) during runtime, so I don't have the luxury of using Palm-MakeROM.exe. Instaed, I have a library of routines that abstract the nuances of writing data to flash, which are tried and true. The most difficult part was the requirement that the code performing the write to card 1 must resides on and execute from card 0. To copy a PDB from card 0 to Card 1, I go through ExgDBWrite(). My custom DB Write procedure knows how to write to flash ROM, and writes the PDB to an arbitrary, valid, and unused addresspace on Card 1. When Palm OS stops calling my DBWrite proc, I can see my destination PDB on Card 1 matches, bit-for-bit, its origin PDB on Card 0. I do this by using the Palm Debugger Console's memory dump command. However as I say, this PDB is not noticed by DmFindDatabase() or "Dir 1" command. Is there a trick to getting PalmOS to see and use my database? Perhaps I need to set its ROM DB bit, or copy it immediately after any existing PDBs that are on Card 1? Putting it at an arbitrary location seems so arbitrary, but I don't know what else to do. Your help is appreciated! -Jeff Ps: I need to preserve the unique IDs assigned to the records in this DB if at all possible, as they are used as foreign key referenes in other databases. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
