> slength = StrLen(tmptext);

you should allocate an extra byte for the string terminator, viz:

slength = StrLen(tmptext) + 1;

> textHandle = DmNewRecord(QivDB, &index, 100);

here you can save space with:

textHandle = DmNewRecord(QivDB, &index, slength);

> textPtr = MemHandleLock(textHandle);
> 
> DmWrite(textPtr, 0, tmptext, slength);

and here slength should be defined as above.

> MemHandleUnlock(textHandle);
> DmReleaseRecord(QivDB, index, true);

You are probably not dead yet, but your record is.



-- 
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