Use transactions to manage how changes are committed to a geodatabase.
Transactions allow you to control how changes are added to a database. This is useful to ensure that when multiple changes are made to a database, they all succeed or fail at once. For example, you could have a business rule that both parent/guardian and student must be added to a database used for calculating school bus routes. You can use transactions to avoid breaking the business rule if you lose power while between the steps of adding the student and parent/guardian.
Tap on the map to add multiple types of features. To apply edits directly, uncheck the "Requires Transaction". When using transactions, use the buttons to start editing and stop editing. When you stop editing, you can choose to commit the changes or roll them back.
- Create a
Geodatabase
using the mobile geodatabase file location. - Display the
Geodatabase.FeatureTables
in feature layers. - If a transaction is required, begin one using
Geodatabase.BeginTransaction()
. - Add one or more features to the feature table(s).
- When ready, either commit the transaction to the geodatabase with
Geodatabase.CommitTransaction()
or roll back the transaction withGeodatabase.RollbackTransaction()
.
- Geodatabase
- Geodatabase.BeginTransaction
- Geodatabase.CommitTransaction
- Geodatabase.IsInTransaction
- Geodatabase.RollbackTransaction
- GeometryEditor
This sample downloads the Save The Bay Geodatabase item from ArcGIS Online.
The mobile geodatabase contains a collection schema for wildlife sightings around Christmas Bay, TX, USA. It was created using data from the Save The Bay Feature Service.
commit, database, geodatabase, geometry editor, transact, transactions