Platform SDK: Broadcast Architecture

CDatabaseRecordset::SeekAddRS

The SeekAddRS method finds an existing record, or adds a new record. C syntax is shown.

HRESULT SeekAddRS(
  CObject &coo
);

Parameters

coo
Reference to a record object.

Return Values

Returns one of the following HRESULT values.

Value Meaning
E_FAIL The record does not exist and cannot be added.
S_FALSE     The record already exists, and SeekAddRS set the recordset pointer to the existing record.
S_OK The record was added successfully.

Remarks

The SeekAddRS method uses the index field to check the current recordset for the specified record. For example, if your application calls the CStationRecordset::SeekAddRS method and passes a CStation object, the method compares the index field, in this case the call letters, in the station object passed to the index field in records in the recordset.

If SeekAddRS finds a match, it moves the recordset pointer to the matching object. If it does not find a match, it adds the record your application passed to the end of the recordset.

If you do not want your application to add the record to the recordset when no match is found, your application should use the CDatabaseRecordset::UpdateRS 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::UpdateRS