The SeekRow method moves the cursor to a specific position in the table.
|This method is not supported on hierarchy tables or message stores tables.|
HRESULT SeekRow ( BOOKMARK bkOrigin, LONG lRowCount, LONG FAR * lplRowsSought );
[in] Bookmark identifying the starting position for the seek operation; must be BOOKMARK_BEGINNING, indicating that the seek operation starts from the beginning of the table.
[in] Signed count of the number of rows to move, starting from the bookmark identified by the bkOrigin parameter. For attachment tables, this must be zero.
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
Another operation is in progress that prevents the row-seeking operation from starting. Either the operation in progress should be allowed to complete or it should be stopped.
SeekRow establishes a new BOOKMARK_CURRENT position for the cursor. The lRowCount parameter indicates the number of rows that the cursor moves and the direction of movement. If the resulting position is beyond the last row of the table, the cursor is positioned after the last row. If the resulting position is before the first row of the table, the cursor is placed at the beginning of the first row
To search to the beginning of the table, pass zero in lRowCount and the value BOOKMARK_BEGINNING in bkOrigin.
If there are large numbers of rows in the table, the SeekRow operation can be slow. Do not set lRowCount to a number greater than 50.