Share via


IMAPITable::SeekRow (Compact 7)

3/12/2014

This method moves the cursor to a specified position in the table.

Note

This method is not supported on hierarchy tables or message stores tables.

Syntax

HRESULT SeekRow (
  BOOKMARK bkOrigin,
  LONG lRowCount,
  LONG FAR * lplRowsSought
);

Parameters

  • bkOrigin
    [in] Bookmark that identifies the starting position for the seek operation; must be BOOKMARK_BEGINNING, which indicates that the seek operation starts from the beginning of the table.
  • lRowCount
    [in] Signed count of the number of rows to move, starting from the bookmark that the bkOrigin parameter identifies. For attachment tables, this must be zero.
  • lplRowsSought
    [in] Ignored.

Return Value

The following table shows the possible return values.

Value Definition

S_OK

The method succeeded.

MAPI_E_BUSY

Another operation is in progress that prevents the row-seeking operation from starting. Either the operation in progress must be allowed to finish or it must be stopped.

E_FAIL

The operation failed due to an unspecified error.

E_INVALIDARG

The operation failed because one or more of the arguments is not valid.

E_OUTOFMEMORY

The operation failed because it needs more memory resources.

E_UNEXPECTED

The operation failed due to an unexpected error.

Remarks

The SeekRow method establishes a new BOOKMARK_CURRENT position for the cursor.

To search to the beginning of the table, pass zero in the lRowCount parameter and the value BOOKMARK_BEGINNING in the bkOrigin parameter.

If the table contains a large number of rows, the SeekRow operation can be slow. For optimal performance, set lRowCount to a value less than 50.

Requirements

Header

mapidefs.h

Library

cemapi.lib

See Also

Reference

IMAPITable
IMAPITable::QueryRows