Platform SDK: Broadcast Architecture

CDatabaseRecordset::OpenIndexed

The OpenIndexed method opens a recordset with a specified index. C syntax is shown.

void OpenIndexed(
  int iKeyID,
  int nOpenType,
  LPCTSTR lpszSQL,
  int nOptions
);

Parameters

iKeyID
String resource identifier that contains the name of the index to use with the recordset. Most tables have a recordset with an index named either "Primary Key" or "TSSLoadBy" in the Guide database. The database scheme for each table indicates which fields are key indexes.
nOpenType
Value that specifies whether to open the recordset as a dynaset or a snapshot. This parameter can be one of the following values.
Value Meaning
dbOpenSnapshot     Open the recordset as a snapshot, in other words as a fixed copy of the records in the table.
dbOpenDynaset Open the recordset as a dynaset, in other words as a set of pointers to the records in the table. The dbOpenDynaset value is the default.

lpszSQL
Name of the table to open. You can also use this parameter to pass in any SQL statement that can be used to open a table.
nOptions
Options to pass to the DAO OpenRecordset method.

Return Values

This method does not return a value.

Remarks

Calling OpenIndexed is functionally equivalent to calling OpenRecordset and then calling the DAO method SetIndex. SetIndex is the DAO wrapper for the Index Automation property for a DAO recordset.

The table-specific versions of OpenIndexed and OpenRecordset are implemented by the CTableNameRecordset objects that inherit from CDatabaseRecordset. For more information on the inheritance structure of the Guide data objects, see About Guide Data Objects.

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::OpenRecordset