Platform SDK: Broadcast Architecture

CDatabaseRecordset::FindRecord

The FindRecord method searches the recordset for a record that matches the specified type and search criteria. C syntax is shown.

LONG FindRecord(
  LONG FindType,
  LPCTSTR Criteria
);

Parameters

FindType
Flag that specifies the type of record to find. This flag can be one of the following values.
Value Meaning
dbFindFirst Finds the first record in the recordset that matches the criteria.
dbFindLast Finds the last record in the recordset that matches the criteria.
dbFindNext Finds the next record that matches the criteria, searching from the current position in the recordset.
dbFindPrevious Finds the record directly previous that matches the criteria, searching from the current position in the recordset.

Criteria
String that can be evaluated as a logical expression within the context of the recordset, for example:
Channel Number = 27

Return Values

Returns a LONG that specifies the zero-based index of the found record if successful. If a match is not found, FindRecord moves the record pointer to the first record and returns –1.

Remarks

Opening a recordset by using the OpenIndexed method and then using the Seek method to find records provides better performance than using the FindRecord method.

Requirements

  Windows NT/2000: Unsupported.
  Windows 95/98: Requires Windows 98.
  Header: Declared in dbsets.h.
  Import Library: Use dbsets.lib or dbsetsst.lib.

See Also

CDatabaseRecordset::OpenIndexed, CDatabaseRecordset::Seek