> From: Marvin
>
> My database record structure looks something like this:
>
> typedef struct{
>     UInt index
>     CharPtr Answer1;
>     CharPtr Date1;
>     CharPtr Time1;
>     CharPtr Answer2;
>     CharPtr Date2;
>     CharPtr Time2;
> }records;
> ...
> I know that with this new values, the record memory
> size has enlarged. So I have resized my 5th record
> ...

You didn't show how you actually write your data, but I would guess that you
are doing it wrong.  The records structure contains no space for storing
strings; it only contains one UInt and some pointers to Char.  When you
write out your data, you must copy the actual strings to your database
record.  So, *every* record is likely to be a different size than every
other record (unless all your strings are the same size).  To learn how to
write variable sized records to a Palm OS database, read one of the Palm
books, or look at the code for the sample apps that comes with the SDK.


-- 
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