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


IFeatureWorkspace.CreateQueryDef Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureWorkspace Interface > IFeatureWorkspace.CreateQueryDef Method
ArcGIS Developer Help

IFeatureWorkspace.CreateQueryDef Method

Create a query definition object.

[Visual Basic .NET]
Public Function CreateQueryDef ( _
) As IQueryDef
[C#]
public IQueryDef CreateQueryDef (
);
[C++]
HRESULT CreateQueryDef(
void
);

Product Availability

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

Functional License Check

If your application/site is not appropriately licensed, CreateQueryDef can return an error of FDO_E_NO_SCHEMA_LICENSE.

Remarks

The CreateQueryDef method can be used to create a new query definition object that can be evaluated by returning a cursor.

With personal geodatabases, QueryDefs do not return newly inserted rows, within an edit session when the QueryDef contains a Where Clause.  The edits must be saved and the QueryDef executed outside of the edit session or Search must be used to return the information.

See Also

IFeatureWorkspace Interface