Hi,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. 1. in ArcCatalog, sde connection->properties->Domains, I can see a list of defined domains and its properties&values. this works fine for both Oracle and SQL Server databases.2. then in ArcObjects, I tried following code to get a specific domain:IWorkspaceDomains2 workspaceDomains = (IWorkspaceDomains2)workspace; IDomain requestedDomain = workspaceDomains.get_DomainByName(domainName);
using Domain names in step 1, only one domain name can actually return a domain object, while all others return null.3. then I tried following code in order to iterate and get a list of available domain names:IList<string> domainNameList = new List<string>(); IDomain domain = workspaceDomains.Domains.Next(); while (domain != null) { domainNameList.Add(domain.Name); domain = workspaceDomains.Domains.Next(); }
this time, it'll ran into an infinite loop as workspaceDomains.Domains.Next() doesn't actually change domain; the domain points to the same domain name all the time.I tried this in both databases, no luck.The data set is from client.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...thanks in advance!