Hey guys, what could be causing this error? I'm using Palm OS 3.3 and the
error is 5424: Err Getting Rec. Normally it's because of a busy record when
the DmGetRecord is called, but I don't see how this is possible.
This is the function that causes it:
void foo(UInt index)
{
tblFpur theFpur;
tblPackedFpurPtr p;
VoidHand record;
UInt numRec;
Int i;
// Get a count of the matching records
numRec = CountFpurRecord(index);
// Do a sort
DmInsertionSort(gFpurDB, (DmComparF *)ComparePackedFpurRecord, index);
// Knock the top record off repetitively until satisfied
for(i = 0; i < numRec; i++)
DmRemoveRecord(gFpurDB, 0);
// Get a count of all the records in the database
numRec = DmNumRecords(gFpurDB);
for(i = 0; i < numRec; i++)
{
record = DmGetRecord(gFpurDB, i);
p = MemHandleLock(record);
UnpackFpur(&theFpur, p);
// If the records deleted were under this record, drop it's ID by
one
if(theFpur.ID > index)
{
theFpur.ID -= 1;
PackFpur(&theFpur, record);
}
MemHandleUnlock(record);
DmReleaseRecord(gFpurDB, index, true);
}
}
Thanks in advance!
+++++++++++++
Timothy D. Astle
Embedded Systems Programmer
ALT Group Inc.
+++++++++++++
People on Jolt cola write the funniest things.
A-10 Obedience Guide,
Kitty Hawk Studios
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/