This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programmatic updates in JDBC 2.0

 
Alok Pota
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic