<?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: How can I get a layer's DataSource properties. in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717070#M19103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, another option, if the data is published via server, would be to use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.NET&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPublishLayer.DataDetails&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/001200000p29000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/001200000p29000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Java&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureLayer.getDataDetails()&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/arcgis/carto/FeatureLayer.html"&gt;http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/arcgis/carto/FeatureLayer.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You get a nicely formatted String with those properties you're looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Data Type: ArcSDE Database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Location: Server: Server Name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;User: username&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instance: sde:sqlserver:whatever&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Version: dbo.DEFAULT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Description: Instance default version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Class: server.owner.name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And, as you can see the Java version gets the output wrong.&amp;nbsp; I reported as a potential bug...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 17:39:51 GMT</pubDate>
    <dc:creator>LeoDonahue</dc:creator>
    <dc:date>2012-01-17T17:39:51Z</dc:date>
    <item>
      <title>How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717065#M19098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some loaded layers in a map control, and I would like to get some information from these layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know what classes/interfaces I need to use in order to get the information that is displayed in a layer properties Source tab. (See attached pic)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep in mind, these are ALREADY loaded layers. I'm not attempting nor able to load the layers myself and get the information at that point. (if that makes any difference)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for the data for these items&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt; &lt;BR /&gt; &lt;LI&gt;Data Type:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;Feature Class:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;SERVER:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;INSTANCE:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;Location:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;AUTHENTICATION_MODE:&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;VERSION:&lt;/LI&gt; &lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;I already have the information for &lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt; &lt;BR /&gt; &lt;LI&gt;Feature Type&lt;/LI&gt; &lt;BR /&gt; &lt;LI&gt;Geometry Type&lt;/LI&gt; &lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 22:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717065#M19098</guid>
      <dc:creator>ESRICustomer</dc:creator>
      <dc:date>2012-01-05T22:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717066#M19099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just for reference, may be wrong&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�?�Data Type: IFeatureLayer.DataSourceType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�Feature Class: IFeatureLayer.featureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�SERVER: IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("Server")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�INSTANCE:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("Instance")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�Location:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("database")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�AUTHENTICATION_MODE:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("AUTHENTICATION_MODE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; �?�VERSION:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("version")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bing&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 23:04:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717066#M19099</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-05T23:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717067#M19100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just for reference, may be wrong&lt;BR /&gt;&lt;BR /&gt;�?�Data Type: IFeatureLayer.DataSourceType&lt;BR /&gt; �?�Feature Class: IFeatureLayer.featureClass&lt;BR /&gt; �?�SERVER: IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("Server")&lt;BR /&gt; �?�INSTANCE:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("Instance")&lt;BR /&gt; �?�Location:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("database")&lt;BR /&gt; �?�AUTHENTICATION_MODE:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("AUTHENTICATION_MODE")&lt;BR /&gt; �?�VERSION:IFeatureLayer.featureClass-&amp;gt;Idataset-&amp;gt;IpropertySet-&amp;gt;GetProperty("version")&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Bing&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&amp;nbsp; I'll try those and report back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 23:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717067#M19100</guid>
      <dc:creator>ESRICustomer</dc:creator>
      <dc:date>2012-01-05T23:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717068#M19101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;have you got a sample of this working? I'm trying to do exactly the same thing with some SDE layers in a map but hitting an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pfeatureclass = pfeaturelayer.FeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pdataset = pfeatureclass.FeatureDataset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MsgBox(pdataset.PropertySet.GetProperty("Server"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pfeatureclass seems to be set okay but pdataset is always nothing which then causes the propertyset to fail&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 14:08:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717068#M19101</guid>
      <dc:creator>AndyBridle</dc:creator>
      <dc:date>2012-01-17T14:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717069#M19102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use&amp;nbsp; pfeatureclass.FeatureDataset if the feature class is stored inside feature dataset. if not use below statement to convert ifeatureclass to idataset and then get the connection properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IDataset pdataset = pfeatureclass as IDataset;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 14:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717069#M19102</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2012-01-17T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717070#M19103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, another option, if the data is published via server, would be to use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.NET&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPublishLayer.DataDetails&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/001200000p29000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/0012/001200000p29000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Java&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureLayer.getDataDetails()&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/arcgis/carto/FeatureLayer.html"&gt;http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/arcgis/carto/FeatureLayer.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You get a nicely formatted String with those properties you're looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Data Type: ArcSDE Database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Location: Server: Server Name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;User: username&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instance: sde:sqlserver:whatever&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Version: dbo.DEFAULT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Description: Instance default version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Class: server.owner.name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And, as you can see the Java version gets the output wrong.&amp;nbsp; I reported as a potential bug...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 17:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717070#M19103</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-01-17T17:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a layer's DataSource properties.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717071#M19104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can use&amp;nbsp; pfeatureclass.FeatureDataset if the feature class is stored inside feature dataset. if not use below statement to convert ifeatureclass to idataset and then get the connection properties.&lt;BR /&gt;&lt;BR /&gt;IDataset pdataset = pfeatureclass as IDataset;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;many thanks, working now&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 08:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-get-a-layer-s-datasource-properties/m-p/717071#M19104</guid>
      <dc:creator>AndyBridle</dc:creator>
      <dc:date>2012-01-18T08:16:21Z</dc:date>
    </item>
  </channel>
</rss>

