Select to view content in your preferred language

IWorkspaceEdit2.StartEditOperation and AbortEditOperation in a NON-versioned database

956
1
04-08-2010 09:09 AM
VitorFortunato
Deactivated User
Hello,

I am trying to use Edit Operations inside an edit session in a non-versioned  database, without success though.
It seems that is not possible to rollback (AbortEditOperation) just one operation.

Is it possible to use Edit Operations in an non-versioned database?

My code bellow:

// Cast the workspace to the IWorkspaceEdit2 and IMultiuserWorkspaceEdit interfaces.
IWorkspaceEdit2 workspaceEdit2 = (IWorkspaceEdit2)GetWorkspace();
IMultiuserWorkspaceEdit muWorkspaceEdit = (IMultiuserWorkspaceEdit)GetWorkspace();

// Start a non-versioned edit session.
muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMNonVersioned);

// Start an Edit Operarion
workspaceEdit2.StartEditOperation();
// ...
// MODIFICATION 1
// ...
// Close and save the operation
workspaceEdit2.StopEditOperation();

// Start the second Edit Operation
workspaceEdit2.StartEditOperation();
// ...
// MODIFICATION 2
// ...
// Abort the operation (Although it won't be rolled back)
workspaceEdit2.AbortEditOperation();

// After this point, I got saved the modifications 1 and 2, in spite of the AbortEditOperation being called after the second modification




Any ideas?
0 Kudos
1 Reply
VitorFortunato
Deactivated User
Is anybody there?
0 Kudos