It may not be a practical solution to this problem, but PalmOS 
does have the logic for database duplication hidden away in 
there: you can transmit a database via ExgDBWrite and receive it 
via ExgDBRead; and if you set the "localMode" flag in the 
ExgSocket that manages the transmission, the sending and 
receiving applications can be on the same device.  I've done 
this, for the purpose of testing beaming code, but I used 
different sending and receiving applications.  It might be 
possible for them to be the same application, in which case the 
application would need to handle the 
sysAppLaunchCmdExgReceiveData launch code and initiate an 
ExgDBRead sequence.  Remember to give a different name to the 
duplicate database.  It turns out that the first 32 bytes 
transmitted by ExgDBWrite() consist of the database name; 
ExgDBWrite's WriteProc gets to see the data, and can modify these 
bytes if it so desires, though relying on these 32 bytes to 
contain the name probably doesn't make for a robust application.

At 01:58 PM 8/15/2001 -0300, Leonardo Gomes Holanda wrote:
>I have a single pdb on my Palm device and I would like to 
>duplicate it. Do I
>have to make a main loop where I make a copy of each record to 
>the new
>database or is there any function where I can make a copy of the 
>entire
>database in a single step?...


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

Reply via email to