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


IARLayer.SearchARFeatures Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (PublisherControls)  

IARLayer.SearchARFeatures Method

Searches the layer using a search definition and returns an ARFeatureCursor.

[Visual Basic .NET]
Public Function SearchARFeatures ( _
    ByVal pSearchDef As ArcReaderSearchDef _
) As ARFeatureCursor
[C#]
public ARFeatureCursor SearchARFeatures (
    ArcReaderSearchDef pSearchDef
);

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

Searches the ARLayer based upon an attribute or spatial query as defined by the ArcReaderSearchDef. The ARLayer must be Searchable.

Use the ARFeatureCursor to retrieve each ARFeature one at a time. If there are no ARFeature objects matching the query the first IARFeatureCursor::NextARFeature will return nothing.

 

 

Errors Returned

2004 800A07D4: Only possible to search feature layers 

2029 800A07ED: Unintialized search definition

2034 800A07F2: The query has failed 

2113 800A0841: The current document does not have permission to query features 

2127 800A084F: This layer has inaccessible data 

Remarks

The SearchARFeatures method will return an error if the currently loaded document was not published with permission to QueryFeatures. Use the IARControl::HasDocumentPermission method to determine this.

If there is an error with the query, such as ill-formed SQL, the error returned will contain an error description from the underlying database.

See Also

IARLayer Interface