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


IARLayer.QueryARFeatures Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > PublisherControls > ESRI.ArcGIS.PublisherControls > Interfaces > IA > IARLayer Interface > IARLayer.QueryARFeatures Method
ArcGIS Developer Help

IARLayer.QueryARFeatures Method

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

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

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

All ARFeature objects matching the query are instantiated in the ARFeatureSet. If the number of features could be very large, this may not be desirable as it may result in a long delay and consume a large amount of memory. Instead use the SearchARFeatures method. If there are no features matching the query the IARFeatureSet::ARFeatureCount property will return 0.

Errors Returned

2004 800A07D4: Only possible to search feature layers 

2029 800A07ED: Unitialized 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 QueryARFeatures 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