Gavin,
The return from DmFindSortPosition will give me the record position..... I am also trying to determine whether the record already exists in the database. (A return value of 0 would tell me that it exists). I need to know whether the record should be added or modified.... The unique key in my database is a customer number.
So is there a way to get the return value (-, 0, +) from the callback function?
No, there's no way to get that value returned as part of the DmFindSortPosition call. However, it's really simple to do your own DmQueryDatabase on the return value and call your own callback to do a final comparison after the system's found the position. Just take the return value of the call, subtract one, query that record, and then pass that pointer along with the pointer to the new value to the callback function.
-- 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/
