Hello,
I need to update shaes files column values, I was using this in MS2:
Layer.UpdateTableData(feature.RecordNumber, columnName, rowValue);
I tried this with 3.x:
feature.ColumnValues[COLUMN_NAME] = "toto";
Layer.Open();
Layer.EditTools.BeginTransaction();
Layer.EditTools.Update(feature);
Layer.EditTools.CommitTransaction();
Layer.Close();
The column is effectively updated but the feature is move to (0,0)
Any idea?
Patrick.
Patrick,
Try the following code snippet; I think it is what you are trying to find:
ShapeFileFeatureSource shapeFileFeatureSource = new ShapeFileFeatureSource(@"");
shapeFileFeatureSource.Open();
shapeFileFeatureSource.BeginTransaction();
shapeFileFeatureSource.UpdateDbfData("5", COLUMN_NAME, "too");
TransactionResult result = shapeFileFeatureSource.CommitTransaction();
shapeFileFeatureSource.Close();
Any more questions just let me know.
Thanks.
Yale
It’s working fine,
Thank you Yale.
Welcome, Patrick!
Any more questions just let me know.
Thanks.
Yale