wood burning stoves*
The moose likes JDBC and the fly likes Programmatic updates in JDBC 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Programmatic updates in JDBC 2.0" Watch "Programmatic updates in JDBC 2.0" New topic
Author

Programmatic updates in JDBC 2.0

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
First of all does the driver that comes with
Oracle 8.1.6 /Oracle 9.0 support JDBC 2.0
I use the JavaSoft JDBC 2.0 tutorial example of
programmatically inserting rows in the database.
and gives me a SQLException sayng that the
ResultSet is read only.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Alok
What type of ResultSet are you using? did you make it updateable when you created it?
this will make your ResultSet scrollable and updateable:
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
hope that helps


Dave
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

classes12.zip (thin driver) is jdbc 2.0 compliant... which means it does support scrollable resultsets.
For Oracle sample code, refer to "Programmatic Updates" -->"Source" at http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83728/04jserv2.htm#1006439
Jamie
 
 
subject: Programmatic updates in JDBC 2.0