Two points to add to Dane Avilla's excellent answer:
Your calls to ExgSend and ExgDisconnect should be conditional on ExgPut
having succeeded.
Note that you don't have to use ExgDBWrite to convert a database to a
"flattened" prc/pdb. The file is already in the appropriate form to send so
your job is actually easier than beaming a database from main memory.
--
Danny @ Palm
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/