Dean -
your assumption as correct - there is null character in between the
"fields" of your record.
just be sure thay when you read in your record, NOT from the start, that
you add 1 to the offset to include this null character.
for example the second field would be:
StrCat(listChoice, precord + (length_of_first_record + 1);
On Thu, 8 Feb 2001, Rochester, Dean wrote:
> Hi
>
> I am new to this Palm OS programming and am working through databases. My
> question is I have an example where the contents of a database record is
> read into a string. The database record contains
>
> date, time, firstname, lastname
>
> The part I am fuzzy on is
>
> // append the first name to the character string
> StrCat(listChoice, precord + DB_FIRST_NAME_START);
> StrCat(listChoice, " ");
>
> What I make of this is that listChoice is getting appended to it the
> contents of the record starting at offset of
>
> precord + DB_FIRST_NAME_START
>
> But how does it know when to stop adding characters to listChoice?
>
> precord + DB_FIRST_NAME_START
>
> Points to the start of the field for First Name.
>
> Is there a NULL character between the fields in the record?
>
> Thanks in advance
> Dean-O
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/