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.

In installable cloud apps, for each transaction object, multiple transactions may be opened and closed (in sequence) through the entire lifespan of the application. And the opening and closing of transactions can be managed implicitly or explicitly.

Explicit management -- There are scripts that control when the transaction commits or rolls back.

  • when AutoCommit = true, or

  • when AutoCommit = false but Commit/Rollback is explicitly executed in the code

    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.

Implicit management -- PowerServer automatically closes the transaction.

  • 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).