<?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: File Geodatabase row.SetValue error in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476980#M800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You haven't provided enough code to see your Search parameters; if you specified&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a true on recycling, then it's not surprising that the Rows in the enumeration are&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;not durable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: If you use the "Code" block operator ("#" in th editor UI), then the Forums&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;will preserve your indent scheme.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 00:01:43 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2013-04-09T00:01:43Z</dc:date>
    <item>
      <title>File Geodatabase row.SetValue error</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476977#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a Text field with Length of 1073741822 (pretty long) I'm able to set value with no error but getting value throws following error: The value type is incompatible with the field type. Code is simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;string text = row.GetString("fieldName");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if i query row.FieldInformation i get correct results: Field type is String and Length is 1073741822&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We're using v1.2 but i dont see anything in 1.3 that would fix this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We found a solution to this, and it seems to be a bug in API:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;This works:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;foreach (Row dRow in RowCollection)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; dRow.GetString(fieldname);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;This doesn???t work:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Row row = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;foreach (Row dRow in RowCollection)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; Row = dRow;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row.GetString(fieldname);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;This doesn't work&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Row row = RowCollection.First();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row.GetString(fieldname);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 21:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476977#M797</guid>
      <dc:creator>PrzemyslawTyrtania</dc:creator>
      <dc:date>2013-04-04T21:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: File Geodatabase row.GetValue error</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476978#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the first example, the Row is in scope.&amp;nbsp; In the second it is not.&amp;nbsp; The third usage&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is rather odd; I'm not suprised it doesn't work -- cursors have a lifetime, after all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried extracting the data while the row was in scope?&amp;nbsp; That is the expected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;use pattern.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A gigabyte text field, while legal, isn't likely to be the most efficient way to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;manage data. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: At five months since release, you really ought to be using the v1.3 release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 01:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476978#M798</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-04-05T01:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: File Geodatabase row.GetValue error</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476979#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In the first example, the Row is in scope.&amp;nbsp; In the second it is not.&amp;nbsp; The third usage&lt;BR /&gt;is rather odd; I'm not suprised it doesn't work -- cursors have a lifetime, after all.&lt;BR /&gt;&lt;BR /&gt;Have you tried extracting the data while the row was in scope?&amp;nbsp; That is the expected&lt;BR /&gt;use pattern.&lt;BR /&gt;&lt;BR /&gt;A gigabyte text field, while legal, isn't likely to be the most efficient way to &lt;BR /&gt;manage data. &lt;BR /&gt;&lt;BR /&gt;BTW: At five months since release, you really ought to be using the v1.3 release.&lt;BR /&gt;&lt;BR /&gt;- V&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yea i should have cleaned up that code a bit before posting, it was a copy/paste from email, either way it doesn't work, the idea of code below is to take the first row from collection so that i can return it and other function will modify it later, or maybe i want to modify it in the same method, either way it will error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Row row = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; foreach (Row dRow in RowCollection)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; row = dRow;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; row.GetString(fieldname);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i will update to v1.3 but since this is really a cursor that you're impleneting i will probably get same results, howerver you guys should have really named this a 'cursor' and why include all of these collection methods if they do not work ie .First() since everything must be done in scope none of them will work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Row row = RowCollection.First();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; row.GetString(fieldname);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 10:51:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476979#M799</guid>
      <dc:creator>PrzemyslawTyrtania</dc:creator>
      <dc:date>2013-04-08T10:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: File Geodatabase row.SetValue error</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476980#M800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You haven't provided enough code to see your Search parameters; if you specified&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a true on recycling, then it's not surprising that the Rows in the enumeration are&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;not durable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: If you use the "Code" block operator ("#" in th editor UI), then the Forums&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;will preserve your indent scheme.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 00:01:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/file-geodatabase-row-setvalue-error/m-p/476980#M800</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-04-09T00:01:43Z</dc:date>
    </item>
  </channel>
</rss>

