<?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 GetRow: Difference bettween .Shp &amp;amp;amp; FileGDb in ArcGIS Explorer Desktop Questions</title>
    <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/getrow-difference-bettween-shp-amp-amp-filegdb/m-p/63763#M384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm populating a listbox with values from a column in a layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes the layer could be from a .shp and other times it could be from a File GeoDb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's my current code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim x,NumberOfRows as Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NumberOfRows = theTable.GetRows.Count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;While (x &amp;lt; theNumberofRows)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; r = theTable.GetRow(x)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; values = r.Values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Listbox1.Items.Add(values(theField).ToString)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End While&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a result of the code above if I had identical .shp &amp;amp; FileGeoDb containing 4 records &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The .Shp would give values for records 2,3,4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The FileGDb would give values for records 1,2,3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use (x &amp;lt;= theNumberOfRows):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The FileGDb works fine, but crashes on .Shp's&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially, I believe one table is zero based and the other starts at 1.&amp;nbsp; So how do I check to see what the format of the layer is to correct the counter to adjust accordingly??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 17:14:57 GMT</pubDate>
    <dc:creator>NeedHelp</dc:creator>
    <dc:date>2012-06-12T17:14:57Z</dc:date>
    <item>
      <title>GetRow: Difference bettween .Shp &amp;amp; FileGDb</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/getrow-difference-bettween-shp-amp-amp-filegdb/m-p/63763#M384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm populating a listbox with values from a column in a layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes the layer could be from a .shp and other times it could be from a File GeoDb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's my current code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim x,NumberOfRows as Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NumberOfRows = theTable.GetRows.Count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;While (x &amp;lt; theNumberofRows)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; r = theTable.GetRow(x)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; values = r.Values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Listbox1.Items.Add(values(theField).ToString)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End While&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a result of the code above if I had identical .shp &amp;amp; FileGeoDb containing 4 records &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The .Shp would give values for records 2,3,4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The FileGDb would give values for records 1,2,3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use (x &amp;lt;= theNumberOfRows):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The FileGDb works fine, but crashes on .Shp's&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially, I believe one table is zero based and the other starts at 1.&amp;nbsp; So how do I check to see what the format of the layer is to correct the counter to adjust accordingly??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 17:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/getrow-difference-bettween-shp-amp-amp-filegdb/m-p/63763#M384</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2012-06-12T17:14:57Z</dc:date>
    </item>
  </channel>
</rss>

