Greetings,
Kind of a beginner question here...
I have to find records in a database based on two character fields in the record. In other words these two fields together constitute a primary key. Is my only choice to iterate through the entire database? Something like this?
for (int i = 0; i < DmNumRecords(); i++) { memHandle = DmGetRecord(dmRef); // Evaluate the fields }
I see the function DmFindRecordByID(...) but I don't understand what the Unique ID value is.
First, for this kind of operation, use DmQueryRecord -- that doesn't set the busy bit or alter the DB header, while DmGetRecord does.
Second, the unique ID is a unique value that Palm OS puts in the record header when the record is created. This is described in the "Palm OS Companion" book that's part of the Palm OS SDK.
-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
