<?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 Re: Getting ArcSDE GeoDatabase Domain values in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614322#M34635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you, i think this is the point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Simon,&lt;BR /&gt;&lt;BR /&gt;I checked with someone who uses the gdb api all the time and it looks like IWorkspaceDomains2.Domains pulls all the domains so IWorkspaceDomains2.Domains.Next will always be the first one. He suggested to put the enumeration of domains in another variable and then loop through that.&lt;BR /&gt;&lt;BR /&gt;For example something like:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;IEnumDomain allDomains = workspaceDomains.Domains;&amp;nbsp; 
IDomain domain = allDomains.Next();
//now loop through allDomains &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You could also pull the domain list using SQL. There is a topic and examples in the doc:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000tv000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;10.1 Help - Browsing geodatabase system tables with SQL &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000ts000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;10.1 Help - Example: Finding domain owners using SQL&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 02:16:42 GMT</pubDate>
    <dc:creator>SimonLeo</dc:creator>
    <dc:date>2021-12-12T02:16:42Z</dc:date>
    <item>
      <title>Getting ArcSDE GeoDatabase Domain values</title>
      <link>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614320#M34633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to read domain table values from ArcSDE GeoDatabase in ArcObjects code. I have two testing GeoDB in Oracle and SQL Server respectively. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. in ArcCatalog, sde connection-&amp;gt;properties-&amp;gt;Domains, I can see a list of defined domains and its properties&amp;amp;values. this works fine for both Oracle and SQL Server databases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. then in ArcObjects, I tried following code to get a specific domain:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IWorkspaceDomains2 workspaceDomains = (IWorkspaceDomains2)workspace; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDomain requestedDomain = workspaceDomains.get_DomainByName(domainName);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;using Domain names in step 1, only one domain name can actually return a domain object, while all others return null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. then I tried following code in order to iterate and get a list of available domain names:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IList&amp;lt;string&amp;gt; domainNameList = new List&amp;lt;string&amp;gt;(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDomain domain = workspaceDomains.Domains.Next(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (domain != null) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domainNameList.Add(domain.Name); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domain = workspaceDomains.Domains.Next(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;this time, it'll ran into an infinite loop as &lt;/SPAN&gt;&lt;STRONG&gt;workspaceDomains.Domains.Next()&lt;/STRONG&gt;&lt;SPAN&gt; doesn't actually change domain; the domain points to the same domain name all the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this in both databases, no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The data set is from client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;anybody could give me some suggestions on how to look into this issue further? is this more of a data issue? but I can see those domains in ArcCatalog no problem...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 17:10:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614320#M34633</guid>
      <dc:creator>SimonLeo</dc:creator>
      <dc:date>2013-06-04T17:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting ArcSDE GeoDatabase Domain values</title>
      <link>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614321#M34634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Simon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked with someone who uses the gdb api all the time and it looks like IWorkspaceDomains2.Domains pulls all the domains so IWorkspaceDomains2.Domains.Next will always be the first one. He suggested to put the enumeration of domains in another variable and then loop through that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IEnumDomain allDomains = workspaceDomains.Domains;&amp;nbsp;&amp;nbsp; IDomain domain = allDomains.Next(); //now loop through allDomains &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also pull the domain list using SQL. There is a topic and examples in the doc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000tv000000.htm" rel="nofollow" target="_blank"&gt;10.1 Help - Browsing geodatabase system tables with SQL &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000ts000000.htm" rel="nofollow" target="_blank"&gt;10.1 Help - Example: Finding domain owners using SQL&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614321#M34634</guid>
      <dc:creator>ForrestJones</dc:creator>
      <dc:date>2013-06-06T17:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting ArcSDE GeoDatabase Domain values</title>
      <link>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614322#M34635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you, i think this is the point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Simon,&lt;BR /&gt;&lt;BR /&gt;I checked with someone who uses the gdb api all the time and it looks like IWorkspaceDomains2.Domains pulls all the domains so IWorkspaceDomains2.Domains.Next will always be the first one. He suggested to put the enumeration of domains in another variable and then loop through that.&lt;BR /&gt;&lt;BR /&gt;For example something like:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;IEnumDomain allDomains = workspaceDomains.Domains;&amp;nbsp; 
IDomain domain = allDomains.Next();
//now loop through allDomains &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You could also pull the domain list using SQL. There is a topic and examples in the doc:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000tv000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;10.1 Help - Browsing geodatabase system tables with SQL &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/006z/006z000000ts000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;10.1 Help - Example: Finding domain owners using SQL&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/getting-arcsde-geodatabase-domain-values/m-p/614322#M34635</guid>
      <dc:creator>SimonLeo</dc:creator>
      <dc:date>2021-12-12T02:16:42Z</dc:date>
    </item>
  </channel>
</rss>

