Can someone please point me to a good example for using versioned editing with a C#? I am working on a console application to edit attributes in a sde geodatabase.
The below is working for non-versioned tables.
Console.WriteLine("start editing");
IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;
workspaceEdit.StartEditing(false);
workspaceEdit.StartEditOperation();
TestFeature.Value[fieldIndex] = testString;
TestFeature.Store();
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(true);
Console.WriteLine("editing stopped");
Thanks!
No, not yet....
You'll need to use iVersionedWorkspace and iVersion. Something like this prior to the code you shared...
pVersionedWorkspace = pWorkspace
pVersion = pVersionedWorkspace.FindVersion("myversion")
'check to make sure pVersion is not nothing
pWorkspace = pVersion