Pls ignore this. I do solve the problem. Thank you.
Quennie Keng
Sent by: To: [EMAIL PROTECTED]
Quennie KENG cc:
Subject: Re: dmErrWriteOutOfBounds when
DmWrite
10/04/2002
09:42 AM
Hi.
Ok, now the real problem is not the data size. even i have used it
sizeof(DATE), it appear the same problem to me. Furthermore, if i use the
DmWriteCheck on other data type, the problem is still exist.
void PackRecord(PhoneInfoDBPackedRecordType *s, PhoneInfoDBRecordType r)
{
UInt16 size;
char zero = 0;
UInt32 offset = 0;
DmWrite(s, offset, &r.flag, sizeof(r.flag));
offset+=sizeof(r.flag);
err = DmWriteCheck (s, offset,StrLen(r.name)+1);
if (err)
ErrAlert(err);
// still return the same problem
or
err = DmWriteCheck(s, offset, sizeof(DATE));
if (err)
ErrAlert(err);
- - - -
What is the actual problem?? pls do help.
>From:� "Dave Lippincott" <[EMAIL PROTECTED]>
>Date:� Thu�Oct�3,�2002� 12:49 pm
>Subject:� Re: dmErrWriteOutOfBounds when DmWrite
>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/
