CDatabaseRecordset::OpenIndexed

[This is preliminary documentation and subject to change.]

The OpenIndexed method opens a recordset and indexes it.

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

Parameters

iKeyID
Specifies a string resource identifier that contains the name of the index to open. Most tables have either a "Primary Key" or a "TSSLoadBy" recordset in Tss.mdb.
nOpenType
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, create a fixed copy of the records in the table.
dbOpenDynaset Open the recordset as a dynaset, a set of pointers to the records in a table. This is the default.

lpszSQL
Specifies the name of the table to open. You can also use this parameter to pass in any SQL statement that can be opened.
nOptions
Specifies options to pass into the OpenRecordset call. To locate more information about OpenRecordset, see Further Information on Program Guide Services for the Client.

Return Values

This method does not return a value.

Remarks

This method is functionally equivalent to calling the OpenRecordset method and then calling SetIndex, where the SetIndex method is the DAO wrapper for the Index Automation property for the DAO Recordset.

QuickInfo

  Windows NT: Unsupported.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in dbsets.h.
  Import Library: Use dbsets.lib or dbsetsSt.lib.
  Unicode: Yes.