On Mon, Feb 04, 2002 at 10:55:55AM -0800, Robert McKenzie wrote: > Just a guess here, but I would suspect that you have a perfectly valid > (non-deleted) record in your database without any handle associated with it > (i.e., with a NULL handle). How can this happen, I hear you ask? Simple -- > Just use DmAttachRecord with a NULL new handle! There **may** be other ways > to get into this state, but that is the only one I found.
Thanks for the tips. For the benefit of the archive, let me explain what it ultimately turned out to be. The first problem was a bug that, in some cases, was not moving records to the end of the database after archiving them. The record that was returning NULL on a DmGetRecord was 0 bytes in size and had the dmRecAttrDelete bit set. DmGetRecord was returning NULL, and DmGetLastErr was not indicating an error, because there was none. DmRecordInfo worked just fine on the record. The second problem was very similar. Sometimes my prefs database would have incorrect information that told my app to load a deleted/archived record on startup. scott -- ------------------------------------------------------------------------ scott [EMAIL PROTECTED] ------------------------------------------------------------------------ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
