• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

updateXXX function of ResultSet ....???

 
Harish Kashyap
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i've set my connection type to be updatable
but i couldn't set the same property for the resultset because there's no method available for the same.

the following code gives me exception
rs.updateString("field1","1");
rs.updateRow();

java.sql.SQLException: Invalid operation for read only resultset: updateString

by which method can i set the resultset type to be updatable
thanx
[This message has been edited by Harish Kashyap (edited September 03, 2001).]
 
namita pa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i think the resultset is updatable or not depends on the jdk version you are using .please check with it
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The ResultSet interface allows the driver to ignore this request without even notifying you!
If you find that it is actually updatable then try setting the connection's autocommit to false and manually commit the changes.
Jamie


[This message has been edited by Jamie Robertson (edited September 07, 2001).]
 
valluri venkata reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
You have to use select columnname from table instead of using select * , then it can be updatable
see this site
you can find good info
http://technet.oracle.com/doc/oracle8i_816/java.816/a81354/resltse2.htm#1018228
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic