aspose file tools*
The moose likes JDBC and the fly likes rollback, save point ..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rollback, save point ....." Watch "rollback, save point ....." New topic
Author

rollback, save point .....

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rollback, save point .....