What happens if you call the Commit method of a transaction and an exception occurs during the commit process?

  • The transaction is committed, and the changes are persisted in the database.
  • The transaction is partially committed, leaving the database in an inconsistent state.
  • The transaction is rolled back.
  • The transaction remains in a pending state until the exception is resolved.
If an exception occurs during the commit process after calling the Commit method of a transaction, the transaction is rolled back to maintain data integrity. This ensures that either all changes are successfully committed, or none of them are.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *