CdbRecordset::SetIndex, GetIndex Property

Sets or returns a value that indicates the name of the current Index object in a table-type Recordset object.

Settings and Return Values

The setting or return value is a string expression that evaluates to the name of an Index object in the Indexes collection of a table-type Recordset created by a TableDef object.

GetIndex returns a CString data type.

Syntax

VOIDSetIndex(LPCTSTR pstr);

CStringGetIndex(VOID);

Set Parameters

Type Example Description
LPCTSTR pstr A string containing the name of an Index object.

Remarks

Records in base tables aren't stored in any particular order. Setting the Index property changes the order of records returned from the database; it doesn't affect the order in which the records are stored.