Thanks Brian, Dave and Howard.

Brian Smith wrote:

> On Wed, 24 Apr 2002, Jay Francis wrote:
>
> > When I use 21 as the size for the new record I get an error message
> > Application (1.0) called SysFatal Alert with the message:  "DataMgr.c,
> > Line 7025,DmWrite:DmWriteCheck failed"
> >
> > When I use 22 everything works perfectly.
> >
> > Am I not seeing something obvious?
> >
> > typedef struct {
> >  UInt16 waterbody;      //max value =  9999, 2 bytes
> >  Char surveyDate[11];   //          =  01/01/1994, 11
> > bytes includes null terminator
> >  UInt16 area;           //max value =  999,  2 bytes
> >  UInt16 method;         //max value =  999,  2 bytes
> >  UInt16 station;        //max value =  999,  2 bytes
> >  UInt16 effort;         //max value = 9999,  2 bytes
> >  } InfoRecordStruct;  // 21 bytes
>
> The size of that string buffer is likely being rounded up to the nearest
> 2-byte boundary, so it actually takes up 12 bytes instead of 11.
>
> -----------------------------------------------------------------------
> Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/
> Software Developer  //  Gamer  //   Webmaster  //  System Administrator
> When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.


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

Reply via email to