One transaction vs. multiple transactions

In PowerBuilder traditional C/S applications, for each transaction object, the same transaction is used through the entire lifespan of the application. The transaction is opened when CONNECT statement is executed (and then it is kept open) and closed when the DISCONNECT statement is executed. The long-running connection and the C/S architecture make this possible.

In installable cloud apps, for each transaction object, multiple transactions may be opened and closed (in sequence) through the entire lifespan of the application. The opening and closing of transactions is managed implicitly, or explicitly when Commit/Rollback is executed in the code or AutoCommit = true.

For example, in PowerServer, when AutoCommit = false:

  • When querying the database (such as running DataWindow Retrieve or embedded SQL Select), PowerServer automatically starts and then closes the transaction (implicit management).

  • When updating the database (such as running DataWindow Update or embedded SQL Update/Delete), PowerServer starts a transaction automatically and then closes it when a Commit/Rollback is explicitly executed in the code or the transaction timeout is reached.