are there any function such as StartEditing()\StartEditOperation in AE?

3042
2
07-18-2012 10:50 PM
DieNie
by
New Contributor
Hi there,

i'm a gis programmer in china and not good at english.

recently , when i insert a row to a table in "File Geodatabase API 1.2", there throw a exception "The user does not have permission to execute the operation".
[ATTACH=CONFIG]16230[/ATTACH]

i think it's because some table object in .gdb file can not be edited. are there any function to set table's editable status such as StartEditing()\StartEditOperation in AE?

the following example code is wrote in VS 2010(C#):

try
            {
                string gdbfile = @"E:\test3.gdb";

                Geodatabase geodatabase = Geodatabase.Open(gdbfile);

                //open table
                Esri.FileGDB.Table ptable = geodatabase.OpenTable("RegulatedAreasAndLimitsP");
                if (!ptable.IsEditable)
                {
                    MessageBox.Show("can not edit");
                }

                //create row
                Esri.FileGDB.Row cabazonRow = ptable.CreateRowObject();

                PointShapeBuffer cabazonGeom = new PointShapeBuffer();
                cabazonGeom.Setup(ShapeType.Point);
                cabazonGeom.point.x = 10.0;
                cabazonGeom.point.y = 20.0;

                cabazonRow.SetGeometry(cabazonGeom);

                //store the row
                ptable.Insert(cabazonRow);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
0 Kudos
2 Replies
LanceShipman
Esri Regular Contributor
I would look at the permissions for your file geodatabase. Check the files under the file geodatabase directory. The IsEditable function only indicates if the table is part of a controler dataset (network, topology, etc.) which we do not let you edit with the API. There is no equivalent of the ArcObjects StartEditing()\StartEditOperation in the API.
0 Kudos
DieNie
by
New Contributor
hi,lshipman
thank you.
i have checked my file geodatabase, the "RegulatedAreasAndLimitsP" table is within a topology rule.
so maybe i have to use AO to edit the featureclass.

the file geodatabase is a ESRI Nautical Solution geodatabase, i create it in ArcCatalog by "XML Workspace File"  import tool with "ESRINautical\Desktop10.0\Enc\Schemas\Workspace\NAUTICAL_TEMPLATE_GX_10.0.0.0.XML".
[ATTACH=CONFIG]16268[/ATTACH]

I would look at the permissions for your file geodatabase. Check the files under the file geodatabase directory. The IsEditable function only indicates if the table is part of a controler dataset (network, topology, etc.) which we do not let you edit with the API. There is no equivalent of the ArcObjects StartEditing()\StartEditOperation in the API.
0 Kudos