|
||
Note: This section is provided as a reference for the legacy CommDb component, which has been superceded by the CommsDat component. It is strongly recommended that users migrate to CommsDat. For implementations using CommsDat, see Transactions in the CommsDat API and Migration Guide.
To change two columns of the current record, the sequence of calls would be coded:
BeginTransaction() //Gets a shared read-lock on the database
UpdateRecord()
WriteUintL() //Tries to upgrade to an exclusive write-lock
WriteTextL()
PutRecordChanges()
CommitTransaction() //Unlocks database
To read more than one record and guarantee that the content of each record does not change between the read operations, wrap the set of read operations within a transaction.
BeginTransaction() //Gets a shared read-lock on the database
ReadUintL()
GotoNextRecord()
ReadUintL()
CommitTransaction() //Unlocks database