<?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: Can't get access to row's OBJECTID in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244470#M418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to follow up, I found the problem. I was using a LINQ .Single() method to update a single row, and wasn't disposing my RowCollection. Somehow this was causing the Row object to become disassociated with the table it was selected from.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2011 13:07:07 GMT</pubDate>
    <dc:creator>DanielWalton</dc:creator>
    <dc:date>2011-08-31T13:07:07Z</dc:date>
    <item>
      <title>Can't get access to row's OBJECTID</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244466#M414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to access to the OBJECTID field of a table as a primary key so I can apply edits. It so happens that OBJECTID is the only unique field in the table. But whenever I try to access the value of OBJECTID with GetOID() or GetInteger("OBJECTID") I get the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; "The value type is incompatible with the field type." &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached the XML description of the table. The values of OBJECTID in my table range from 2 to 100. Any ideas what's wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 19:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244466#M414</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-08-23T19:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access to row's OBJECTID</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244467#M415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The attachment didn't make it. Here's my second try.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 19:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244467#M415</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-08-23T19:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access to row's OBJECTID</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244468#M416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't say for sure, but I think that this issue manifests itself in another way when I do manage to get to table.Update(row), where I get the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The table does not contain an OID Field."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the xml description and my data, the table clearly does contain an OID field. I have tried creating the feature class from scratch and re-importing the data, to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, it's worth noting that I am able to Update() the table if I do my edits using a single RowCollection. But If I recycle the initial RowCollection and use another one later in my code, I get the above error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be very appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 20:15:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244468#M416</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-08-23T20:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access to row's OBJECTID</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244469#M417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The XML looks correct. Can you post a code fragment. The .NET Wrapper ExecutineSQL sample prints out the OBJECTID and is working locally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 20:19:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244469#M417</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2011-08-23T20:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access to row's OBJECTID</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244470#M418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to follow up, I found the problem. I was using a LINQ .Single() method to update a single row, and wasn't disposing my RowCollection. Somehow this was causing the Row object to become disassociated with the table it was selected from.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 13:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/can-t-get-access-to-row-s-objectid/m-p/244470#M418</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-08-31T13:07:07Z</dc:date>
    </item>
  </channel>
</rss>

