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


ISqlWorkspace.OpenQueryClass Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISqlWorkspace Interface > ISqlWorkspace.OpenQueryClass Method
ArcGIS Developer Help

ISqlWorkspace.OpenQueryClass Method

Returns a table or a feature class based on a query.

[Visual Basic .NET]
Public Function OpenQueryClass ( _
    ByVal Name As String, _
    ByVal pQueryDescription As IQueryDescription _
) As ITable
[C#]
public ITable OpenQueryClass (
    string Name,
    IQueryDescription pQueryDescription
);
[C++]
HRESULT OpenQueryClass(
  BSTR Name,
  IQueryDescription* pQueryDescription
);
[C++]
Parameters
Name [in]

Name is a parameter of type BSTR pQueryDescription [in]
pQueryDescription is a parameter of type IQueryDescription*

Product Availability

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

Errors Returned

Neither of the following errors will occur immediately on the OpenQueryClass call, but can be raised when trying to use a query class incorrectly.

FDO_E_QUERYCLASS_OIDUNKNOWN - If a query class with mapped IDs is opened and a method attempts to fetch a row by its ID prior to IDs have been mapped, this error will be raised.

FDO_E_QUERYTABLE_OIDMAPPEDCOLUMNHASNULL - If a nullable column is used to map IDs and the query returns a null value, this error will occur when trying to retrieve the row.

Remarks

If ID mapping was defined in the query description passed into this method, the returned query class will include a virtual column containing unique IDs. Aside from cases where conflicts will occur, this column is named "ESRI_OID".

See Also

ISqlWorkspace Interface