Slide 10.18: Line-by-line anatomy of DB.c (cont.)
  Slide 10.20: Line-by-line anatomy of DB.c (cont.)
  Home


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


if ( DmQueryRecord( db, seek ) == NULL ) seek++;
This function MemHandle DmQueryRecord( DmOpenRef dbP, UInt16 index ) returns a handle to a record for reading only (does not set the busy bit).
if ( DmSetRecordInfo( db, index, &attr, NULL ) )
This function Err DmSetRecordInfo( DmOpenRef dbP, UInt16 index, UInt16 *attrP, UInt32 *uniqueIDP ) sets record information stored in the database header.
DmDatabaseSize( dbCard, dbID, NULL, &totalBytes, &dataBytes );
This function Err DmDatabaseSize( UInt16 cardNo, LocalID dbID, UInt32 *numRecordsP, UInt32 *totalBytesP, UInt32 *dataBytesP ) retrieves size information on a database. For the following parameters, pass NULL if you don't want to retrieve them.