File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem with Savepoint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with Savepoint " Watch "Problem with Savepoint " New topic
Author

Problem with Savepoint

Sandeep Ghosh
Ranch Hand

Joined: Jan 23, 2002
Posts: 145
Hi Friend,
I am trying to use Savepoint to control rollback,but it is giving java.lang.UnsupportedOperationException.I have given connection.setAutoCommit(false); at the constructor.When I am removing Savepoint then it is working.Could anybody suggest where I am going wrong.
Thanks in adv
Sonu

[ July 07, 2002: Message edited by: Sonu Ghosh ]
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
1. what database engine are you using?
2. what jdbc driver are you using?
3. what ver of the jdk are you using?
Minus this informations. A quick guess would be that you driver, by default, is not supporting SAVEPOINT.
You may have to...
1. turn on an option on you driver...
not always done within java
2. upgrade you driver
3. apply a patch to your driver
4. upgrade the ver of java you are using
Hope this helps


Multi Platform Database Developer & DBA on E.S.T.
Sandeep Ghosh
Ranch Hand

Joined: Jan 23, 2002
Posts: 145
Hi Monty,
I am using JDBC-ODBC Bridge Driver which comes with the JDK1.4. I am using Access as Database.
Could you be more details on your suggestion
Thanks in adv
Sonu
[ July 09, 2002: Message edited by: Sonu Ghosh ]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Sonu, the JDBC-ODBC driver does not support that method.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Sandeep Ghosh
Ranch Hand

Joined: Jan 23, 2002
Posts: 145
Hi Monty,
Which driver support this feature and what I have to do for that to work.
Sonu
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I don't think MS Access itself supports transactions, so it would be difficult, if not impossible to provide transaction support via jdbc:
Taken from here, "the Jet engine does not support atomic transactions: It does not guarantee that all changes performed within a transaction boundary are committed or rolled back."
Jamie
 
jQuery in Action, 2nd edition
 
subject: Problem with Savepoint