Line-by-line Anatomy of DB.c (Cont.)


DmReleaseRecord( db, index, true );
This function Err DmReleaseRecord( DmOpenRef dbP, UInt16 index, Boolean dirty ) clears the busy bit for the given record and sets the dirty bit if dirty is true. Call this routine when you finish modifying or reading a record that you've called DmGetRecord( ) on or created using DmNewRecord( ).
DmRecordInfo( db, curRec, &attr, NULL, NULL )
This function Err DmRecordInfo( DmOpenRef dbP, UInt16 index, UInt16 *attrP, UInt32 *uniqueIDP, LocalID *chunkIDP ) retrieves the record information as stored in the database header. For the following parameters, pass NULL if the values are not wanted.
if ( ( error = DmRemoveRecord( db, curRec ) ) == 0 ) {
This function Err DmRemoveRecord( DmOpenRef dbP, UInt16 index ) removes a record from a database and disposes of its data chunk. It should only be used for newly-created records that have just been deleted or records that have never been sync'ed.