I'm betting that the problem is in the definition of questions_record_type.

It appears (though I can't tell for sure) that you are allocating dynamic strings when you build your questions, and then storing pointers to those strings in your database. When you exit your program, those strings are gone, and the pointers are invalid. I could be wrong on this--based it on the code in EditQuestionRecord.

Instead you should be using DmWrite calls in EditQuestionRecord that refer to the length of the string. The questions themselves have to be in your DB. When you have multiple variable-length strings in one DB record, you'll probably need an offset structure per record to keep track of where the starts are. Alternatively, you could use null-separated strings; there's an OS function to build an array of pointers to the starts of thsoe strings, name escapes me at the moment.

H

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

Reply via email to