This document is archived and information here might be outdated.  Recommended version.


ICheckIn2.CheckInFromGDB2 Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabaseDistributed)  

ICheckIn2.CheckInFromGDB2 Method

Checks in changes from a check-out database.

[Visual Basic .NET]
Public Function CheckInFromGDB2 ( _
    ByVal parentDB As IWorkspaceName, _
    ByVal checkoutName As String, _
    ByVal checkOutDB As IWorkspaceName, _
    ByVal reconcileCheckout As Boolean, _
    ByVal childReconcilePolicy As esriReplicaReconcilePolicyType, _
    ByVal columnLevel As Boolean, _
    ByVal createOIDMappingTable As Boolean _
) As Boolean
[C#]
public bool CheckInFromGDB2 (
    IWorkspaceName parentDB,
    string checkoutName,
    IWorkspaceName checkOutDB,
    bool reconcileCheckout,
    esriReplicaReconcilePolicyType childReconcilePolicy,
    bool columnLevel,
    bool createOIDMappingTable
);
[C++]
HRESULT CheckInFromGDB2(
  IWorkspaceName* parentDB,
  BSTR checkoutName,
  IWorkspaceName* checkOutDB,
  VARIANT_BOOL reconcileCheckout,
  esriReplicaReconcilePolicyType childReconcilePolicy,
  VARIANT_BOOL columnLevel,
  VARIANT_BOOL createOIDMappingTable,
  VARIANT_BOOL* conflicts_detected
);
[C++]

Parameters parentDB [in]
parentDB is a parameter of type IWorkspaceName checkoutName [in] checkoutName is a parameter of type BSTR checkOutDB [in]
checkOutDB is a parameter of type IWorkspaceName reconcileCheckout [in] reconcileCheckout is a parameter of type VARIANT_BOOL childReconcilePolicy [in]
childReconcilePolicy is a parameter of type esriReplicaReconcilePolicyType columnLevel [in] columnLevel is a parameter of type VARIANT_BOOL createOIDMappingTable [in] createOIDMappingTable is a parameter of type VARIANT_BOOL conflicts_detected [out, retval] conflicts_detected is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The CheckinfromGDB2 method applies the changes made in the checkOutDB (check-out geodatabase) to the parentDB (master geodatabase or parent replica) workspace. Unlike the CheckinfromGDB method available off the ICheckin interface, CheckinfromGDB2 enables you to specify how conflicts are defined, detected and applied during check in.

The checkoutName is needed to identify the check-out that is being checked in.

If createOIDMappingTable is True, tables are created in the parent replica geodatabase that describe the changes that are checked in. These tables are named <check-out name>_OM and <check-out name>_RC. If tables with these names already exist, they are deleted and replaced with a new pair of tables for the check in. If the check in process fails, these tables are not recovered.

The <check-out name>_OM table records the pre- and post- check-in ObjectID values for new features/rows that have been added. The <check-out name>_RC table records all the changes made to the checked out data which include inserts (0), updates (1) and deletes (2).

Conflicts

If reconcileCheckout is TRUE, the changes are applied to the check-out version and this version is reconciled with its parent version. If reconcileCheckout is FALSE, the changes are applied to the check-out version, but no reconcile is performed.
If reconcileCheckout is TRUE and there are no conflicts during reconcile, a FALSE is returned, otherwise TRUE is returned. Conflicts can occur if a feature is edited in the check-out database and in the parent version of the parent database. 

You should never edit the check-out version prior to check in. During check in, any coincidental changes are over-written with changes from the check-out database without notification of a conflict.

If you set reconcileCheckout to TRUE and there are conflicts or if reconcileCheckout is set to FALSE, the check-out version is updated and remains on the parent database. This allows you to manually reconcile at a later time. If you set reconcileCheckout to TRUE and there are no conflicts, the check-out version is removed.

The childReconcilePolicy parameter takes an esriReplicaReconilePolicyType enumeration to determine how conflicts will be handled during reconcile. The following describes the meaning of each enumeration:


esriReplicaDetectConflicts -If conflicts occur, the reconcile process is aborted and you must reconcile and post manually after sycnhronization is completed.

esriReplicaResolveConflictsInFavorOfImportedChanges - The representation in the check-out geodatabase is automatically applied if conflicts arrise.

esriReplicaResolveConflictsInFavorOfDatabaseChanges - The representation from the parent replica importing is automatically applied if conflicts arrise.

esriReplicaResolveConflictsNone - This enumeration has meaning for check-out replicas only. It indicates that a reconcile and post should not be applied during synchronization.

If columnLevel is TRUE, conflicts are detected only when the same attribute is updated in both the check-out and the parent replica. For example, if the check-out has modified the parcel's owner attribute and the parent replica has modified the parcel's street address attribute the feature will not be in conflict. It is only when each version modifies the same attribute that the object will be in conflict.

The CheckInFromGDB2 method returns TRUE if conflicts were detected.  It returns FALSE if no conflicts were detected.

See Also

ICheckIn2 Interface