CCeDBDatabase::SeekToIndex

This method 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.

At a Glance

Header file: Wcedb.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later

Syntax

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

Parameters

dwCurrIndex
Specifies 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
Boolean value that is set to TRUE to indicate that the search is from the end of the database, or to FALSE to indicate that the search is from the beginning.

Return Values

The object identifier of the specified record, or zero if the seek operation fails. To get extended error information, call GetLastError.

Remarks

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

This method never sets the m_bEOF data member to TRUE.

See Also

CCeDBDatabase::Open, GetLastError