LYH wrote:

Would anyone be kind to help me?


How is "mes" declared?

With
mes.username = "user01";
mes.title = "defaultTile";

you set 2 char pointers to constant data from your app.

With
StrCopy(mes.content, s);

you copy the content of s to mes.content. Did you reserved the space for it?

Later you try to write "mes" to a database. If mes was declared to actually hold the character data, it will write at least mes.content to the database. But I fear, you just declared some pointers. So you save pointers to memory blocks to the database. When you read it in again, you will be lucky to see username and title again, because the location of your constant data didn't moved. But you will never see content again, because the memory block, where mes.content pointed to, is gone away. But this is a C issue, not a Palm OS issue.


Regards Henk -- ------------------------------------------------------------------------- Henk Jonas Palm OS Â certified developer

  [EMAIL PROTECTED]                                   www.metaviewsoft.de
-------------------------------------------------------------------------

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

Reply via email to