<?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>topic GetDefinitions takes forever to list feature classes in geodatabase in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getdefinitions-takes-forever-to-list-feature/m-p/1507993#M11898</link>
    <description>&lt;P&gt;I'm trying to list a subset of feature classes in a SQL Server database. So I'm executing geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;() and then filtering the resulting IReadOnlyList based on a wildcard match.&lt;/P&gt;&lt;P&gt;Most SQL tables and views are fine when executing &lt;STRONG&gt;geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;()&lt;/STRONG&gt;,&amp;nbsp;but the problem is that it is handing&amp;nbsp;whenever it encounters any complex SQL views. I can see this using the Diagnostic Window when it displays, e.g.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;function="Geodatabase.Table.OpenDataset" code="BeginOpenDataset"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but then never reaches an equivalent "EndOpenDataset".&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;            await QueuedTask.Run(() =&amp;gt;
            {
                try
                {
                    // Try and get all of the feature class definitions.
                    IReadOnlyList&amp;lt;FeatureClassDefinition&amp;gt; fcDefinitions = _geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;();
                    foreach (var definition in fcDefinitions)
                    {
                        // Get the name of the feature class and add it to the list.
                        _tableNames.Add(definition.GetName());
                    }
                }
                catch (Exception)
                {
                    // GetDefinitions throws an exception.
                    throw;
                }
            });&lt;/LI-CODE&gt;&lt;P&gt;I'm only trying to list all of the feature classes so that I can filter them to a subset that the user can then choose from and run a query on. How can I resolve this so that it doesn't hang?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2024 15:30:26 GMT</pubDate>
    <dc:creator>AndyFoy</dc:creator>
    <dc:date>2024-07-22T15:30:26Z</dc:date>
    <item>
      <title>GetDefinitions takes forever to list feature classes in geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getdefinitions-takes-forever-to-list-feature/m-p/1507993#M11898</link>
      <description>&lt;P&gt;I'm trying to list a subset of feature classes in a SQL Server database. So I'm executing geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;() and then filtering the resulting IReadOnlyList based on a wildcard match.&lt;/P&gt;&lt;P&gt;Most SQL tables and views are fine when executing &lt;STRONG&gt;geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;()&lt;/STRONG&gt;,&amp;nbsp;but the problem is that it is handing&amp;nbsp;whenever it encounters any complex SQL views. I can see this using the Diagnostic Window when it displays, e.g.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;function="Geodatabase.Table.OpenDataset" code="BeginOpenDataset"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but then never reaches an equivalent "EndOpenDataset".&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;            await QueuedTask.Run(() =&amp;gt;
            {
                try
                {
                    // Try and get all of the feature class definitions.
                    IReadOnlyList&amp;lt;FeatureClassDefinition&amp;gt; fcDefinitions = _geodatabase.GetDefinitions&amp;lt;FeatureClassDefinition&amp;gt;();
                    foreach (var definition in fcDefinitions)
                    {
                        // Get the name of the feature class and add it to the list.
                        _tableNames.Add(definition.GetName());
                    }
                }
                catch (Exception)
                {
                    // GetDefinitions throws an exception.
                    throw;
                }
            });&lt;/LI-CODE&gt;&lt;P&gt;I'm only trying to list all of the feature classes so that I can filter them to a subset that the user can then choose from and run a query on. How can I resolve this so that it doesn't hang?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 15:30:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/getdefinitions-takes-forever-to-list-feature/m-p/1507993#M11898</guid>
      <dc:creator>AndyFoy</dc:creator>
      <dc:date>2024-07-22T15:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: GetDefinitions takes forever to list feature classes in geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getdefinitions-takes-forever-to-list-feature/m-p/1508326#M11901</link>
      <description>&lt;P&gt;&lt;A href="#" target="_blank" rel="noopener"&gt;@AndyFoy&lt;/A&gt;&amp;nbsp;What does your complex SQL view look like?&amp;nbsp;Could you please give us some details so we can reproduce the issue in-house and fix it?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 22:52:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/getdefinitions-takes-forever-to-list-feature/m-p/1508326#M11901</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2024-07-22T22:52:29Z</dc:date>
    </item>
  </channel>
</rss>

