The following scenarios illustrate how the ESRI OLE DB provider operates in conjunction with the Geodatabase to handle version reconciliation and conflict detection.
Scenario 1 - Geodatabase / OLE DB Connection edits
-
User A starts an ArcMap edit session on a versioned feature class or table.
-
User B makes an OLE DB connection, using the ESRI OLE DB provider, to the same versioned feature class or table and programmatically inserts a row.
-
User B commits the changes and closes the OLE DB connection.
-
User A inserts a row and saves the changes made in the current session. User A will receive a warning that the target for the edits has been altered since they started editing and the changes have been merged into the edit session. User A can review the changes and save again. The rows inserted via the OLE DB connection will show up in the refreshed table view in ArcMap - user A can either save OR continue editing.
Scenario 2 - OLE DB Connection / Geodatabase edits
-
User A makes an OLE DB connection to a versioned feature class or table, starts a new edit session (ADO transcation) and programmatically inserts a row.
-
User B starts an ArcMap edit session on the same versioned feature class or table, inserts some features/rows, saves the changes and ends the ArcMap edit session. N.B. User A's row inserted via the OLE DB connection doesn't show up in the table view yet.
-
User A commits the changes made via the OLE DB connection. No warning is returned from the OLE DB provider that the data source has been altered since the OLE DB edit session was started. The OLE DB provider/Geodatabase will silently reconcile the edits, providing there are no conflicts.
Scenario 3 - OLE DB Connection / Geodatabase Conflicts
-
User A makes a OLE DB connection to a versioned feature class or table, starts a new edit session (ADO transaction) and updates some fields in a row but does not commit the changes.
-
User B starts an ArcMap edit session on the same versioned feature class or table, updates the SAME row, saves the changes and ends the ArcMap edit session.
-
User A tries to commit the changes via the OLE DB connection but receives a warning that the commit method on the connection object has failed. The edit session (ADO transaction) is terminated without the edits being applied. User A could start a new edit session and update the row a second time, over writing the changes User B made.
Scenario 4 - Geodatabase / OLE DB Connection Conflicts
-
User A starts an ArcMap edit session on a versioned feature class or table, starts a new edit session and updates a field in a row but does not save the changes.
-
User B makes an OLE DB connection to the same versioned feature class or table, updates the SAME field, and commits the changes via the OLE DB connection.
-
When user A saves the changes via the ArcMap edit session, a conflict dialog menu will open with the conflicting edits highlighted. User A has three choices:
-
Replace with Conflict Version (the OLE DB connection edits)
-
Replace with Edit Version (the ArcMap edits)
-
Replace with Pre-Edit Version (original field value)