Not in my experience. I'ld physically place a NULL. In your case, like a
"tmpstr[24]=0;"

Derek Kite wrote:
> 
> I am getting an error "Reading from memory management structure"
> 
>         frm = FrmGetFormPtr(jobdetailsform);
> 
>         // copy job number to top label
>         FrmCopyLabel(frm,detailsjobnumlabel,lap->jobdata.fields[inumber]);
>     if (StrLen(lap->jobdata.fields[icustomer]) > 24)
>     {
>                 tmpstr = MemPtrNew(26);
>                 tmpstr = StrNCopy(tmpstr,lap->jobdata.fields[icustomer],24);
> // --->HERE     FrmCopyLabel(frm,detailcustlabel,tmpstr);
>                 MemPtrFree(tmpstr);
> 
>     }
> 
> Does StrNCopy terminate the string with a NULL? All the data looks fine, 
> tmpstr
> contains a truncated string as expected.
> 
> Derek


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to