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


IFeatureWorkspace.CreateQueryDef Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IFeatureWorkspace.CreateQueryDef Method

Create a query definition object.

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

Parameters QueryDef [out, retval]
QueryDef is a parameter of type IQueryDef

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