You haven't shown what src, nilP and tmpare, but one thing I noticed is that
your first three DmWrites use nilP for the 2nd argument but the fourth
DmWrite uses tmp for the 2nd argument. What is tmp?

     -Bob Whiteman

> -----Original Message-----
> From: Kshama Sathaye [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 14, 2000 12:51 PM
> To: Palm Developer Forum
> Subject: DmWriteCheck fails.
> 
> 
> Hello,
> 
> I'm trying to write to a locked handle using DmWrite, but for 
> some reason, I
> keep getting the dmErrNotValidRecord error and I have no clue 
> how to fix it.
> Help is greatly appreciated.
> 
> Here is what i'mdoing.
> 
> 
> custHandle = DmNewHandle(size);
> dest = (PackedCustomerPtr) DmHandleLock(custHandle) ;
> 
>  err = DmWrite(dest, (ULong)&nilP->orderID, &src->orderID ,
> sizeof(src->orderID));
>  ErrFatalDisplayIf(err, "Couldnot pack record");
>  err = DmWrite(dest, (ULong)&nilP->timeStmp, &src->timeStmp,
> sizeof(src->timeStmp));
>  ErrFatalDisplayIf(err, "Couldnot pack record");
>  err = DmWrite(dest, (ULong)&nilP->totalQuantity, &src->totalQuantity,
> sizeof(src->totalQuantity)) ;
>  ErrFatalDisplayIf(err, "Couldnot pack record");
> 
>   err = DmWrite(dest, tmp, &src->expMonth, sizeof(src->expMonth)) ;
>   ErrFatalDisplayIf(err, "Couldnot pack record");
> 
> here .. while the first 3 DmWrite()s work, the 4th one doesnot !!
> 
> should the datatypes matter ??  should the order of DmWrite 
> matter ?? and if
> the record is invalid, how do the first 3 work ??
> 
> Any help is appreciated .. I just dont know how to proceed if 
> this thing
> fails !!
> 
> thank you ..
> -kshama
> 
> 
> 
> -- 
> 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/

Reply via email to