CharPtr GetTripTripNumber(UInt UniqueID)
{
CharPtr c;
tblTrip theTrip;
VoidHand record = DmGetRecord(gTripDB, UniqueID);
tblPackedTripPtr p = MemHandleLock(record);
UnpackTrip(&theTrip, p);
StrCopy(c, theTrip.TripNumber);
MemHandleUnlock(record);
return(c);
}
This function has been causing me much grief :-) Here's what I've
encountered thus far:
#1 It warns me that I should initialize CharPtr c before using it. (why??)
#2 When I use DmGetRecord, I get an "Index out of Range" error, requiring a
hard boot
#3 If I change DmGetRecord to DmQueryRecord, and comment out all the other
code, I get a different error. (NULL based error, probably due to the fact
I hard coded a NULL for a return value :-)
Now, I've heard something about clearing the busy bit... perhaps this has
something to do with my problem? I am aware that DmQueryRecord doesn't set
the busy bit...
Tim
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html