laptop and a wrench

不具合

IQueryDef.Evaluate causes an ArcGIS Engine console application to crash when a SQL expression with the 'AS' keyword is assigned to IQueryDef.Subfields to query a feature class in an Oracle 11g multiuser database

最後に公開された状態: March 21, 2019 ArcGIS for Desktop
不具合 ID 番号 BUG-000120448
送信されましたFebruary 28, 2019
最終更新日June 5, 2024
適用対象ArcGIS for Desktop
見つかったバージョン10.2.1
オペレーティング システムWindows OS
オペレーティング システムのバージョン2008 R2 64 Bit
ステータスWill Not Be Addressed

参考情報

The ability to use AS keyword in the SubFields property of a QueryDef is documented as an invalid pattern and is not supported. https://enterprise.arcgis.com/en/sdk/latest/windows/IQueryName_QueryDef.html "//Invalid sub fields //queryDef.SubFields = "max(Parcel.Area) as Max_Area";" and "IQueryDef::Subfields - This must be a comma delimited list of field names or a * to indicate all columns. Column aliases and functions are invalid."

対処法

Use an alias for IQueryDef.Subfields instead of the original attribute field name. See below for an example (SDE.DynamicProtectiveDevice is replaced with the alias "A")Instead of doing this:
queryDef.SubFields = "SDE.DynamicProtectiveDevice.FEEDERID AS FEEDERID"quesryDef.Tables = "SDE.DynamicProtectiveDevice JOIN SDE.CircuitSource ON SDE.DynamicProtectiveDevice.OBJECTID = SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID";queryDef.whereClause = "SDE.DynamicProtectiveDevice.ANCILLARYROLE = 1 AND SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID IS NOT NULL";
Do this:
queryDef.SubFields = "A.FEEDERID AS FEEDERID"quesryDef.Tables = "SDE.DynamicProtectiveDevice AS A JOIN SDE.CircuitSource ON SDE.DynamicProtectiveDevice.OBJECTID = SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID";queryDef.whereClause = "A.ANCILLARYROLE = 1 AND SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID IS NOT NULL";
The above modified query works fine on Oracle 11g and Oracle 12c Release 1.

再現の手順

不具合 ID: BUG-000120448

ソフトウェア:

  • ArcGIS for Desktop

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動