Begin a transaction on a spatial database dataset opened with a dynamic connection type.
Public Function BeginDatasetTransaction( _ ByVal nDataset As Long _ ) As Integer
- The serial number of the dataset for which a transaction is to be started
- Only a single transaction can be open at a time. If one has already been started, e.g. via the user interface, then BeginDatasetTransaction will fail.
- All changes made to a dataset after a transaction has been started will be part of that transaction whether made through the user interface or the API.
- Transactions can be opened only on spatial datasets held in Oracle Spatial or PostGIS and connected with a dynamic connection type.
- Immediately upon a transaction receiving an edit, i.e. a change to the dataset, the underlying table is locked. This will cause any other sessions making changes to the table to wait for this transaction to be finished.
- If a transaction is not committed or rolled-back, it will be rolled-back when the session ends. In this case, changes made in the transaction will be discarded even if the SIS user replies yes to the dialog asking if the SWD is to be saved.
Available GEO OD SISpy
Dim nDataset As Integer = GisGetInt(SIS_OT_OVERLAY, 1, "_nDataset&")
Dim SISError as Integer
SISError = GisGetInt(SIS_OT_SYSTEM, 0, "_ExecError&")
If SISError <> SIS_ERROR_OK Then MsgBox("Unable to begin transaction")
This code begins a transaction on the dataset used in overlay 1. Check the error code to see if the GisBeginDatasetTransaction was successful.