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


IGeoDataServer.TableSearch Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabaseDistributed)  

IGeoDataServer.TableSearch Method

Returns the records satisfying the specified query.

[Visual Basic .NET]
Public Function TableSearch ( _
    ByVal versionName As String, _
    ByVal tableName As String, _
    ByVal queryFilter As IQueryFilter, _
    ByVal queryRange As IResultPortionInfo _
) As IGDSQueryResultPortion
[C#]
public IGDSQueryResultPortion TableSearch (
    string versionName,
    string tableName,
    IQueryFilter queryFilter,
    IResultPortionInfo queryRange
);
[C++]
HRESULT TableSearch(
  BSTR versionName,
  BSTR tableName,
  IQueryFilter* queryFilter,
  IResultPortionInfo* queryRange
);
[C++]

Parameters versionName [in]
versionName is a parameter of type BSTR tableName [in]
tableName is a parameter of type BSTR queryFilter [in]
queryFilter is a parameter of type IQueryFilter* queryRange [in]
queryRange is a parameter of type IResultPortionInfo*

Product Availability

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

Remarks

The TableSearch method is used to query tables and feature classes from the geodatabase referenced by the GeoDataServer. Both attribute and spatial queries can be performed. The method returns an instance of GDSQueryResultPortion, which contains a recordset of features or rows that satisfy the query filter. 

The GDSQueryResultPortion can contain up to the number of rows specified by the queryRange parameter. If the query filter returns more rows than the query range allows, subsequent calls to GetNextResultPortion can be used to get the rest of the rows. Results are returned in portions because the GeoDataServer may be from ArcGIS for Server accesed on a network with limited band width.

The maximum number of rows that can be returned by a TableSearch is determined by the IGeoDataServer::MaxRecordCount property.

If the geodatabase referenced by the GeoDataServer is an ArcSDE geodatabase, you can set the versionName parameter to the version on which to execute the query. If no versionName is provided, the version that the GeoDataServer is currently referencing is used. For non-ArcSDE geodatabases, the versionName is ignored.  

The tableName and queryFilter parameters define the query and the table or feature class on which to execute the query. The queryRange defines how to return the results.

See Also

IGeoDataServer Interface

.NET Related Topics

GeoData services