This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Using Oracle thin JDBC driver with Visual Age 4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Using Oracle thin JDBC driver with Visual Age 4? " Watch "Using Oracle thin JDBC driver with Visual Age 4? " New topic
Author

Using Oracle thin JDBC driver with Visual Age 4?

Mr Sason
Greenhorn

Joined: Feb 12, 2002
Posts: 3
Hi,
I'm trying to run my Websphere Test Environment (Visual Age for Java 4) with an Oracle 9i database using the provided Oracle JDBC thin driver. Everything works fine to begin with (I can create new beans etc), but when I try to update fields in my beans using the setter methods an error occurs; "ORA-01002 - fetch out of sequence".
As I understand it, this is a result of the JDBC driver using autocommit = true as default? If this is the case, how do I avoid the problem – i.e. is there a way to make Websphere Test Environment disable autocommit?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

after you create your connection call con.setAutoCommit(false);
If you haven't already done so, any DML statements/transactions will need to have a con.commit(); or con.rollback();
Jamie
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Oracle thin JDBC driver with Visual Age 4?
 
Similar Threads
Where to Place OracleDriver in WebSphere Test Environment for JSP page Development
Websphere Application Server
images included in JSP pages don't always load
Using Oracle thin JDBC driver with Visual Age 4?
Oracle XA Data Source Problem using EJB