AutoCommit and SQLException
AutoCommit and SQLException
От:
"Antony Paul" <antonypaul24@hotmail.com>
Дата:
Hi all,
What happens to transaction when an SQL exception is thrown while it is
in a transaction. Does the connection automatically rollbacks the
transactions or we have to roll back it ?. I am using PreparedStatements and
Statements and no stored procedures.
Is there any specification for the behaviour of connection pools ?.
rgds
Antony Paul
Re: AutoCommit and SQLException
От:
Oliver Jowett <oliver@opencloud.com>
Дата:
Antony Paul wrote: > Hi all, > What happens to transaction when an SQL exception is thrown while it is > in a transaction. Does the connection automatically rollbacks the > transactions or we have to roll back it ? You have to roll it back yourself. PostgreSQL will generate errors on subsequent queries in a transaction after an error (until you roll it back), but that's not necessarily true of other DBs. -O