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 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项