Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rollback, save point .....  RSS feed

Hussein Baghdadi
clojure forum advocate
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have some questions about transactions.
1. as you know, getErrorCode( ) method returns a vendor's error code, so maybe differ from
database to other.
does getSQLState( ) method return a fixed value for a specific problem ?
I mean, I have MYSQL database and I shut it down, when catching the SQLException and calling
getSQLState( ) method, I got 08S01.
if I have oracle database and repeat these steps, will I recieve the same status ?
2. I have the following code :

now, if SQLException is thrown , what should I do at catch statement ?
should I called con.rollback( ) method and then rethrow the exception ?
3. what does setHoldability( ) method mean ? when to use it ?
I have read the API but I don't understand it.
4. In which situation I should use save points ?
your help is really appreciated.
thanks a lot.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!