Slide 10.13: Line-by-line anatomy of DB.c (cont.)
  Slide 10.15: Line-by-line anatomy of DB.c (cont.)
  Home


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


DmSetDatabaseInfo( dbCard, dbID, NULL, &attributes, NULL, ... );
This function Err DmSetDatabaseInfo ( ... ) sets information about a DB.

DmGetDatabaseLockState( db, NULL, NULL, &locks );
This function void DmGetDatabaseLockState( DmOpenRef dbR, UInt8 *highest, UInt32 *count, UInt32 *busy ) returns information about the number of locked and busy records in a database. For the following parameters, pass NULL if you don't want to retrieve them. This function is intended to be used for debugging purposes. You can use it to obtain information about how many records are busy and how much locking occurs.

nbRec = DmNumRecords( db );
This function UInt16 DmNumRecords( DmOpenRef dbP ) returns the number of records in a database. Records that have that have the deleted bit set are included in the count. If you want to exclude these records from your count, use DmNumRecordsInCategory( ) and pass dmAllCategories as the category.