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 updateXXX function of ResultSet ....??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "updateXXX function of ResultSet ....???" Watch "updateXXX function of ResultSet ....???" New topic
Author

updateXXX function of ResultSet ....???

Harish Kashyap
Ranch Hand

Joined: Jun 14, 2000
Posts: 118
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

Joined: Sep 06, 2001
Posts: 56
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

Joined: Jul 09, 2001
Posts: 1879


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

Joined: Jul 23, 2002
Posts: 2
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
 
GeeCON Prague 2014
 
subject: updateXXX function of ResultSet ....???