I am completely missing something here...
When I add records to a DB, I need to tell DmNewRecord or DmAttachRecord
what the index is going to be of the new record. No problem - I can use
dmMaxRecordIndex to always force the record to be added to the end of the
db, or use DmFindSortPosition to find the proper place in sorted order. So
no problem getting records INTO the DB.
But all the functions to retrieve a record from a DB seem to require the
index of the record - how do I know what that is for the record I'm trying
to get? It seems like the very first thing one must to do to be able to find
the record is to get its index, but how do I do that? It must be something
very simple, but I'm not seeing it.
Here's my specific example, if it will help someone answer the question:
I've created a DB with 32 records - one for each tooth. Each record is a
simple struct:
typedef struct {
UInt16 PatientNum; // 0 - ??
UInt8 ToothNum; // 1 - 32
char ToothLabel[3]; // 1 - 32, A-T for kids teeth, 11 - 48 for non-USA,
etc.
} ToothRec
I made a test database with 32 ToothRec's for each of 2 patients, and now
I'm ready to look up the record for a particular patient and tooth number,
so I can display its label. But how?
Thanks,
Brian Smith
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/