Hello everyone!
I want to change attribute table values of shape file using C#.
I tried with code below. The code works, but values are not change.
IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactoryClass();
IWorkspace wrksp = workspaceFactory.OpenFromFile(@"D:\Shape\", 0);
IFeatureWorkspace pFeatWorkspace = wrksp as IFeatureWorkspace;
ITable myTable = pFeatWorkspace.OpenTable("Shape1");
IWorkspaceEdit wrkspcedit = pFeatWorkspace as IWorkspaceEdit;
if (wrkspcedit.IsBeingEdited())
{
wrkspcedit.StartEditing(false);
wrkspcedit.StartEditOperation();
}
myTable.GetRow(5).set_Value(8,"anyvalue");
wrkspcedit.StopEditOperation();
wrkspcedit.StopEditing(true);
Can someone help me?
Thanks!