ArcGIS Pro 2.8 API Reference Guide
GetQueryDescription(String,String) Method

ArcGIS.Core.Data Namespace > Database Class > GetQueryDescription Method : GetQueryDescription(String,String) Method
A valid SQL SELECT statement that describes how the query layer should be created.
A given name.
Gets the QueryDescription object associated with the query layer that is created from one or more database table(s) as specified by queryStatement. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function GetQueryDescription( _
   ByVal queryStatement As String, _
   ByVal queryLayerName As String _
) As QueryDescription

Parameters

queryStatement
A valid SQL SELECT statement that describes how the query layer should be created.
queryLayerName
A given name.

Return Value

The QueryDescription object that fully describes how the underlying database table(s) that make up the query layer should be represented as a Table or FeatureClass if the query layer is spatially enabled.
Exceptions
ExceptionDescription
queryStatement or queryLayerName is null or an empty string.
A database-related exception has occurred.
Remarks
A QueryDescription object fully describes how a single database table or one or more database tables (specified by a valid SQL SELECT statement) should be represented as a Table or FeatureClass if the table is spatially enabled. Essentially, there are two flavors of QueryDescription. The first is created by this method. Given a valid SQL SELECT statement and a query layer name, it encapsulates all the important properties that describe the underlying query layer that is created from one or more tables (i.e., QueryDescription.IsQueryLayer returns true). The second flavor is created by GetQueryDescription(String). Given a table name (fully qualified or unqualified), it encapsulates all the important properties that describe the underlying single table (i.e., QueryDescription.IsQueryLayer returns false).
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Database Class
Database Members
Overload List