<?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 Problem adding features in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/problem-adding-features/m-p/647420#M1040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an empty point feature class and I add a feature using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; tab = gdb.OpenTable("\\" + sClassName);
&amp;nbsp;&amp;nbsp; row = tab.CreateRowObject();
&amp;nbsp;&amp;nbsp; row.SetString("TITLE", "Hwy 69/access road");
&amp;nbsp;&amp;nbsp; row.SetString("DETAIL", "there is no valve here");
&amp;nbsp;&amp;nbsp; pt = new Point(1239977, 12558523);
&amp;nbsp;&amp;nbsp; pb = new PointShapeBuffer();
&amp;nbsp;&amp;nbsp; pb.Setup(ShapeType.Point);
&amp;nbsp;&amp;nbsp; pb.point = pt;
&amp;nbsp;&amp;nbsp; row.SetGeometry(pb);
&amp;nbsp;&amp;nbsp; tab.Insert(row);
&amp;nbsp;&amp;nbsp; tab.Close();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can read the feature just fine using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; tab = gdb.OpenTable("\\" + sClassName);
&amp;nbsp;&amp;nbsp; foreach (Row r in tab.Search("*", "1 = 1", RowInstance.Recycle))
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; pb = r.GetGeometry();
&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = pb.point;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("x=" + pt.x.ToString() + ",y=" + pt.y.ToString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = r.GetString("TITLE");
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("TITLE=" + s);
&amp;nbsp;&amp;nbsp;&amp;nbsp; s = r.GetString("DETAIL");
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("DETAIL=" + s);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; tab.Close();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try to preview the feature class in ArcCatalog or open it in ArcMap (10.0SP4), I get "Error opening feature class, General function failure".&amp;nbsp; Any idea what I might be doing wrong? (I'm using API 1.2)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2012 17:53:00 GMT</pubDate>
    <dc:creator>MarkCederholm</dc:creator>
    <dc:date>2012-04-26T17:53:00Z</dc:date>
    <item>
      <title>Problem adding features</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/problem-adding-features/m-p/647420#M1040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an empty point feature class and I add a feature using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; tab = gdb.OpenTable("\\" + sClassName);
&amp;nbsp;&amp;nbsp; row = tab.CreateRowObject();
&amp;nbsp;&amp;nbsp; row.SetString("TITLE", "Hwy 69/access road");
&amp;nbsp;&amp;nbsp; row.SetString("DETAIL", "there is no valve here");
&amp;nbsp;&amp;nbsp; pt = new Point(1239977, 12558523);
&amp;nbsp;&amp;nbsp; pb = new PointShapeBuffer();
&amp;nbsp;&amp;nbsp; pb.Setup(ShapeType.Point);
&amp;nbsp;&amp;nbsp; pb.point = pt;
&amp;nbsp;&amp;nbsp; row.SetGeometry(pb);
&amp;nbsp;&amp;nbsp; tab.Insert(row);
&amp;nbsp;&amp;nbsp; tab.Close();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can read the feature just fine using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; tab = gdb.OpenTable("\\" + sClassName);
&amp;nbsp;&amp;nbsp; foreach (Row r in tab.Search("*", "1 = 1", RowInstance.Recycle))
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; pb = r.GetGeometry();
&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = pb.point;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("x=" + pt.x.ToString() + ",y=" + pt.y.ToString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = r.GetString("TITLE");
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("TITLE=" + s);
&amp;nbsp;&amp;nbsp;&amp;nbsp; s = r.GetString("DETAIL");
&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("DETAIL=" + s);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; tab.Close();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try to preview the feature class in ArcCatalog or open it in ArcMap (10.0SP4), I get "Error opening feature class, General function failure".&amp;nbsp; Any idea what I might be doing wrong? (I'm using API 1.2)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 17:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/problem-adding-features/m-p/647420#M1040</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2012-04-26T17:53:00Z</dc:date>
    </item>
    <item>
      <title>Problem Solved</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/problem-adding-features/m-p/647421#M1041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured out what was going on.&amp;nbsp; The file geodatabase in question was upgraded from v9.&amp;nbsp; I copied the schema into a feshly created one and the problem went away.&amp;nbsp; Yet more proof that the geodatabase upgrade tool is messed up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 13:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/problem-adding-features/m-p/647421#M1041</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2012-04-30T13:26:15Z</dc:date>
    </item>
  </channel>
</rss>

