I'm trying to sort a rather large database -- about 85,000 records.
When I call the sort routine, I get a "Chunk not locked" message.a
Below are the two routines. Pretty simple. But as soon as I get
to the line calling the sort function, I get the error. I've tried
both Quick and Insertion sorts with the same problem.
SortRecords()
{
DmOpenRef *gDB;
CALLBACK_PROLOGUE;
gDB = DmOpenDatabaseByTypeCreator('Dic', 'SGSI', dmModeReadWrite);
DmQuickSort(gDB, (DmComparF *) DictCompareRecords, 0);
DmCloseDatabase(gDB);
CALLBACK_EPILOGUE
}
UInt DictCompareRecords(Dict *elem1, Dict *elem2, Int i, SortRecordInfoPtr s1,
SortRecordInfoPtr s2, VoidHand appInfoH)
{
int ret;
CALLBACK_PROLOGUE;
ret = StrCaselessCompare(elem1->dict, elem2->dict);
CALLBACK_EPILOGUE
return ret;
}
Any ideas?
Thanks,
Sean.
---
Sean L. Gilley
[EMAIL PROTECTED]
http://www.desert-penguin.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/