Reputation: 220
Suppose I have code with multiple stored procedures executing from c# code. Each of the stored procedures have a commit and a rollback in a case of exception. The exceptions are handled within these stored procedures and return a handled error messages.
If i have a an OracleTransaction.BeginTransaction() "running", on the same connection object when executing stored procedures would an OracleTransaction.Rollback() in c# code actually rollback on a data commmited by previously executed stored procedure.
Logic as follows:
Upvotes: 0
Views: 615
Reputation: 18945
A COMMIT
ends the current transaction, and a new transaction begins with the next executable SQL statement. As a result a subsequent ROLLBACK
can only undo changes made since the previous COMMIT
, but not before that.
Upvotes: 2