try using sizeof(DATE) not sizeof(r.DOB) The first is the size of the
structure, the second is the size of the pointer.  In this case they will be
different.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, October 03, 2002 3:56 AM
Subject: dmErrWriteOutOfBounds when DmWrite


> Hi.
>
> I have encountered an error where i would like to write a date type to my
> DB.
>
> type struct DATE
> {
>   UInt8 day;
>   UInt8 month;
>   UInt16 year;
> };
>
> in the PackRecord function:
>
> DmWrite(s, offset, &r.DOB,sizeof(r.DOB));         // where DOB is a DATE
> type.
> offset+=sizeof(r.DOB);
>
> I use the DmWriteCheck and found this error: dmErrWriteOutOfBounds.
> Basically we define the data size of the particular data, it should be
> alright, right?
>
> Could someone help me??? Do appreciate with your help.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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

Reply via email to