This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISqlWorkspace Interface > ISqlWorkspace.OpenQueryClass Method (ArcObjects .NET 10.5 SDK) |
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,
ITable** ppTable
);
[C++]
Parameters Name [in] Name is a parameter of type BSTR pQueryDescription [in]
pQueryDescription is a parameter of type IQueryDescription ppTable [out, retval]
ppTable is a parameter of type ITable
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.
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".