Show / Hide Table of Contents

Method SyncGeodatabase

SyncGeodatabase(SyncGeodatabaseParameters, Geodatabase)

Creates a job to synchronize a geodatabase back to a service.

Declaration
public SyncGeodatabaseJob SyncGeodatabase(SyncGeodatabaseParameters parameters, Geodatabase geodatabase)
Parameters
Type Name Description
SyncGeodatabaseParameters parameters

Parameters to use to sync the geodatabase.

Geodatabase geodatabase

The geodatabase to sync.

Returns
Type Description
SyncGeodatabaseJob

The job that handles synchronizing the geodatabase.

Remarks

For a successfully completed job, the job's result returns an collection of SyncLayerResult, typically the collection is empty. If individual edits failed then the result collection provides these errors grouped by each table using SyncLayerResult instances which in turn contain each edit error.

You should not execute more than one sync on a geodatabase at the same time. This includes any operations that export/import deltas from the local Geodatabase:

  • ExportDeltaAsync(Geodatabase, String)
  • ApplyDeltaAsync(Geodatabase, String)
  • SyncGeodatabaseJob
  • OfflineMapSyncJob

An exception will be thrown if there is an active transaction on the geodatabase during sync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Edit and sync features: Synchronize offline edits with a feature service.
Geodatabase transactions: Use transactions to manage how changes are committed to a geodatabase.

SyncGeodatabase(SyncDirection, Boolean, Geodatabase)

Creates a job to synchronize a geodatabase back to its service using the given sync direction and rollback on failure boolean value.

Declaration
public SyncGeodatabaseJob SyncGeodatabase(SyncDirection syncDirection, bool rollbackOnFailure, Geodatabase geodatabase)
Parameters
Type Name Description
SyncDirection syncDirection

Sync direction to use when syncing the geodatabase.

Boolean rollbackOnFailure

true to rollback all changes to the service and/or the geodatabase if the job fails, false to accept any of the changes up until the point when the job fails.

Geodatabase geodatabase

The geodatabase to sync.

Returns
Type Description
SyncGeodatabaseJob

The job that handles synchronizing the geodatabase.

Remarks

For a successfully completed job, the job's result returns a collection of SyncLayerResult, typically the collection is empty. If individual edits failed then the result collection provides these errors grouped by each table using SyncLayerResult instances which in turn contain each edit error.

If the given sync direction is not compatible with the sync task's feature service, the returned job will fail.

You should not execute more than one sync on a geodatabase at the same time. This includes any operations that export/import deltas from the local Geodatabase:

  • ExportDeltaAsync(Geodatabase, String)
  • ApplyDeltaAsync(Geodatabase, String)
  • SyncGeodatabaseJob
  • OfflineMapSyncJob

An exception will also be thrown if there is an active transaction on the geodatabase during sync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.3 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.3 - 100.15
iOS100.3 - 100.15
UWP100.3 - 200.0
In This Article
Back to top Copyright © 2022 Esri.