Dana Long wrote:
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?
No. If you keep the database sorted, you can also find it using DmFindSortPosition() or write your own binary search routine.
Something like this?
for (int i = 0; i < DmNumRecords(); i++) {
memHandle = DmGetRecord(dmRef);
// Evaluate the fields
}
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
