Sorry...meant to say A1 instead of C...using DmQueryNextRecord would have given me C.
James Barwick wrote: > OK Palm Guru's....please tell me how to insert in order....here's the > problem. > > Record Index Value Category > 0 A 1 > 1 B 1 > 2 C 1 > 3 A1 2 > 4 B1 2 > 5 C1 2 > > HERE'S ONE STRAIGHT FROM THE DOCUMENTATION!!!!!!! PLEASE READ BELOW > > Page 525 of the Palm OS SDK Reference Guide for the function > DmQueryNextInCategory > in brief it says do the following: > > Definition: > DmQueryNextRecordInCategory(DmOpenRef dbP, UInt16 *indexP, UInt16 > Category); > where in quote "indexP - Often retrieved with DmPositionInCategory" > > Code Snipit example: > > pos = DmPositionInCategory(myDB, record, category); > pos++; > newRecH = DmQueryNextRecordInCategory(myDB, &pos, category); > > If using the above table set record = 4 (Value B1) > Call DmPositionInCategory will return a 1 (second position in category 2) > pos++ sets position=2; > newRecH on DmQueryNextRecordInCategory() would then point to record > Value A1 (the next record in category 2 past index 2). What I wanted > was record C1 Index 5 not index 2. > > Why on EARTH is DmPositionInCategory ever used to return the "Index" > for use in DmQueryNextRecordInCategory. > I can't see when this will EVER work. > > > Help Please! Before I go crazy. > > > > > > > > > > > > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
