Select to view content in your preferred language

How to unregister a replica when a local geodatabase is removed?

2815
4
Jump to solution
05-23-2016 04:24 AM
by Anonymous User
Not applicable


When an offline geodatabase is created from a feature service, a replica is created on the server so that they can be synchronized. When the offline geodatabase is removed from the device, the replica can (should) be removed from the server as it is no longer required.

Does anyone have examples of how to go about unregistering the replica that was linked to a particular offline geodatabase?

I can't see any properties or methods of the Geodatabase object that might reveal the associated replica id. If we at least knew the replica id, then could use a NetworkRequest to unregister it.

Thanks,

-Paul

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Hey Paul,

The unregister method on GeodatabaseSyncTask should do what you need - ArcGIS Runtime SDK for Qt QML API: GeodatabaseSyncTask Class Reference

-Luke

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

Hey Paul,

The unregister method on GeodatabaseSyncTask should do what you need - ArcGIS Runtime SDK for Qt QML API: GeodatabaseSyncTask Class Reference

-Luke

by Anonymous User
Not applicable

Thanks Luke!

0 Kudos
nakulmanocha
Esri Regular Contributor

When you create a geodatabase using GeodatabaseSyncTask::generateGeodatabase, the replica is created and the local database is ready to be edited and synced. If you don't any further syncs or you wanna share that geodatabase, you need to unregister it. It can be done by using [ GeodatabaseSyncTask::unregisterGeodatabase(Geodatabase geodatabase) ].

After that you can go ahead and delete the geodatabase. I hope this helps.

ArcGIS Runtime SDK for Qt QML API: GeodatabaseSyncTask Class Reference

by Anonymous User
Not applicable

Thanks Nakul

0 Kudos