<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea New method: bool IsValidDefinitionQuery(string sql) in ArcGIS Pro SDK Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-ideas/new-method-bool-isvaliddefinitionquery-string-sql/idi-p/1537681</link>
    <description>&lt;P&gt;I'd like to have a new method for BasicFeatureLayer and SubtypeGroupLayer:&amp;nbsp;bool IsValidDefinitionQuery(string sql).&lt;/P&gt;&lt;P&gt;If the user is in charge of the content of the definition query, it could have syntax errors or fields that are missing from the layer. So I'd like to validate the sqlbefore I set it as definition query. Currently the workaround is to perform a Search on the layer using the sql as the WhereClause and checking for a GeodatabaseException with HResult == -2146233088. This is ugly and clumsy. Also, in my add-in the user's definition query is to be applied to every layer for which it is valid, and given that there are hundreds of layers, this workaround makes it prohibitively slow.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2024 10:26:37 GMT</pubDate>
    <dc:creator>PeterVanSchevensteen</dc:creator>
    <dc:date>2024-09-12T10:26:37Z</dc:date>
    <item>
      <title>New method: bool IsValidDefinitionQuery(string sql)</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-ideas/new-method-bool-isvaliddefinitionquery-string-sql/idi-p/1537681</link>
      <description>&lt;P&gt;I'd like to have a new method for BasicFeatureLayer and SubtypeGroupLayer:&amp;nbsp;bool IsValidDefinitionQuery(string sql).&lt;/P&gt;&lt;P&gt;If the user is in charge of the content of the definition query, it could have syntax errors or fields that are missing from the layer. So I'd like to validate the sqlbefore I set it as definition query. Currently the workaround is to perform a Search on the layer using the sql as the WhereClause and checking for a GeodatabaseException with HResult == -2146233088. This is ugly and clumsy. Also, in my add-in the user's definition query is to be applied to every layer for which it is valid, and given that there are hundreds of layers, this workaround makes it prohibitively slow.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 10:26:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-ideas/new-method-bool-isvaliddefinitionquery-string-sql/idi-p/1537681</guid>
      <dc:creator>PeterVanSchevensteen</dc:creator>
      <dc:date>2024-09-12T10:26:37Z</dc:date>
    </item>
  </channel>
</rss>

