CCeDBDatabase::SeekToIndex

This member function searches for a record by index, either from the top or the bottom of the database, and positions the read/write pointer at that record's location.

Syntax

CEOID SeekToIndex( DWORD dwCurrIndex, BOOL bFromEnd = FALSE );

At a Glance

Header file: Wcedb.h
Platforms:
Versions: 2.0 and later

Parameters

dwCurrIndex
The zero-based index of the record sought. If bFromEnd is TRUE, the index is the number of records from the end of the database.
bFromEnd
TRUE if searching from the end of the database, FALSE if searching from the beginning.

Return Values

The object identifier of the specified record, or zero if the seek operation fails. Call ::GetLastError to determine why the operation failed.

Remarks

If the database was opened using a key sort property, the corresponding sort order is used to determine the record indexes.

This function never sets the m_bEOF data member to TRUE.

See Also

CCeDBDatabase Overview, CCeDBDatabase Member Functions, Windows CE Database Classes, CCeDBDatabase::Open, ::GetLastError