This document is archived and information here might be outdated.  Recommended version.


ISqlWorkspace.OpenQueryCursor Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

ISqlWorkspace.OpenQueryCursor Method

Returns a cursor based on a query.

[Visual Basic .NET]
Public Function OpenQueryCursor ( _
    ByVal Query As String _
) As ICursor
[C#]
public ICursor OpenQueryCursor (
    string Query
);
[C++]
HRESULT OpenQueryCursor(
  BSTR Query,
  ICursor** ppCursor
);
[C++]

Parameters Query [in] Query is a parameter of type BSTR ppCursor [out, retval]
ppCursor is a parameter of type ICursor

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Errors Returned

Neither of the following errors will occur immediately on the OpenQueryCursor call, but can be raised while retrieving rows if the query results in data ineligible for a query cursor.

FDO_E_SE_TOO_MANY_LAYERS - The cursor attemped to retrieve a row with multiple geometry columns.

FDO_E_SE_INCOMPATIBLE_COORDREFS - The cursor attempted to retrieve a row with a different spatial reference as previous rows.

Remarks

A query cursor generally behaves like a non-recycling search cursor that returns read-only rows.

See Also

ISqlWorkspace Interface