<?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: Alter Field Failed in c#. in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371037#M613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your explanation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I have got what I want. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 06:52:55 GMT</pubDate>
    <dc:creator>zhouyang</dc:creator>
    <dc:date>2013-04-29T06:52:55Z</dc:date>
    <item>
      <title>Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371030#M606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, everyone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently, I did a test to alter one of the fields let say "CITY_NAME" in "Shapes.gdb" based on the samples from download file "FileGDB_API_VS2010_1_3.zip".&amp;nbsp; But I always encountered a exception message "&lt;/SPAN&gt;&lt;STRONG&gt;Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The below is the field def:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;lt;esri:Field xmlns:xsi='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;' xmlns:xs='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;' xmlns:esri='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.esri.com/schemas/ArcGIS/10.1" rel="nofollow" target="_blank"&gt;http://www.esri.com/schemas/ArcGIS/10.1&lt;/A&gt;&lt;SPAN&gt;' xsi:type='esri:Field'&amp;gt;&amp;lt;Name&amp;gt;CITY_NAME&amp;lt;/Name&amp;gt;&amp;lt;Type&amp;gt;esriFieldTypeString&amp;lt;/Type&amp;gt;&amp;lt;IsNullable&amp;gt;true&amp;lt;/IsNullable&amp;gt;&amp;lt;Length&amp;gt;100&amp;lt;/Length&amp;gt;&amp;lt;Precision&amp;gt;0&amp;lt;/Precision&amp;gt;&amp;lt;Scale&amp;gt;0&amp;lt;/Scale&amp;gt;&amp;lt;AliasName&amp;gt;CITY_NAME&amp;lt;/AliasName&amp;gt;&amp;lt;ModelName&amp;gt;CITY_NAME&amp;lt;/ModelName&amp;gt;&amp;lt;/esri:Field&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I found the function worked fine in TableSchema sample. I compared both of them and the biggest difference is: the field def from mine is I created by myself and I didn't know the real field def when created "Shapes.gdb". The TableSchema sample which works fine is it created a new Geodatabase file from a xml file on the fly, then alter it successfully in this way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if there might be some missing nodes in my field def like Domain,RasterDef which caused the exception since i didn't know the original structure of the Geodatabase file. But, i just alter a normal field which shouldn't include those nodes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached the demo project to show this issue and I have deleted "Shapes.gdb" and FileDDB DLLS for uploading size limitation, both of them can be found in the "FileGDB_API_VS2010_1_3.zip" from Esri. Hope your guys can get me out of this trouble so that I can continue my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Environment: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OS: window 7 sp1 X64&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VS 2010 framework 4.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advanced.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 07:17:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371030#M606</guid>
      <dc:creator>zhouyang</dc:creator>
      <dc:date>2013-04-25T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371031#M607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there any reply? or I didn't descript the question clearly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 00:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371031#M607</guid>
      <dc:creator>zhouyang</dc:creator>
      <dc:date>2013-04-26T00:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371032#M608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I'm reading your code correctly, you are trying to change the length of a character field. This is not supported. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently the documentation doees not indicate what is and is not supported. I will enter a bug and correct this at the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:48:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371032#M608</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2013-04-26T18:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371033#M609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, lshipman, Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But btw, does it means it also not support altering the field type, let say from interger to string? Or the altering field function is totally not works?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, It still saves me a lots of time to debug. Now, we have worked with a workaround for this. In case of others encounter the same issue, I list the steps: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. create a new gdb file with the same structure from original file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. delete the field which would be altered from the new one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Add a new field which is the modified field def in the new one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Insert all the rows into the new gdb file from original gdb file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. delete the original file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6. rename.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But we know it causes a bad performance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We still expect that your team would accomplish it in the future so that we can changed our logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Apr 2013 04:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371033#M609</guid>
      <dc:creator>zhouyang</dc:creator>
      <dc:date>2013-04-27T04:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371034#M610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What possible business case is there for dynamically changing column width&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*or* column type?&amp;nbsp; I've been writing spatial data translators for 25 years,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and I've never encountered the need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recreating the table is *less* likely to cause performance issues than&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fracturing a table by changing the column definitions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Apr 2013 13:45:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371034#M610</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-04-27T13:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371035#M611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, one of our customers ask for us about this case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A simple case is when user found the field defined before is not suitable then he want to alter it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What we think is FileGeodatabase is a database which means we can manager it from creating to destroying. And what we do now is like a database management tool which support create/edit/delete a filegeodatabase, so do its tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps this case is not common in spatial data translators but I guess it should be common in database management tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And also, I am confuse since you think this case is less, but why you provide this Api and then let it do nothing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 00:58:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371035#M611</guid>
      <dc:creator>zhouyang</dc:creator>
      <dc:date>2013-04-28T00:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371036#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm used to doing a database design before I start collecting data.&amp;nbsp; If I have the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;types wrong, it's because I did a poor job on the database design, and I need to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; go back to start in the design process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;File geodatabase, especially through the FGDB API, is just about as mature as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you'd expect it to be for its age.&amp;nbsp; Comparing it to 20 year old databases (most&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;of which still don't permit you to change type) isn't fair to either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FGDB API was released to allow read and write access to geodatabases&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outside of ArcGIS.&amp;nbsp; It certainly wasn't meant to become the basis of the next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL-Developer app.&amp;nbsp; I wasn't part of the design or implementation of the API,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so I'm not sure why an Alter Field even exists (I'd only expect it to work for&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;changes to the formatting of fixed-width types).&amp;nbsp;&amp;nbsp; If you're expecting a lot&amp;nbsp; of&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; new development on the API, to support functionality not related to spatial&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data translators (fmtX-to-fgdb or fgdb-to-fmtX), then I'm sorry, but you're &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;probably going to be disappointed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 14:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371036#M612</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-04-28T14:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Field Failed in c#.</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371037#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your explanation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I have got what I want. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 06:52:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/alter-field-failed-in-c/m-p/371037#M613</guid>
      <dc:creator>zhouyang</dc:creator>
      <dc:date>2013-04-29T06:52:55Z</dc:date>
    </item>
  </channel>
</rss>

