This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes problem with the resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with the resultset" Watch "problem with the resultset" New topic
Author

problem with the resultset

kiran kumar
Greenhorn

Joined: Feb 07, 2005
Posts: 29
Hi, see the bellow code . i am not able to execute updateString() method.



In the above statement iam getting some error like
readable resultset can not be updatable
i am using oracle 9i

please reply to the above problem

[edited to disable smilies and add code tags]
[ February 07, 2005: Message edited by: Jeanne Boyarsky ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Sree,
Welcome to JavaRanch!

I'm just curious what you are trying to do here. Is there something significant about the fifth row? It tends to be dangerous to rely on the data returning in a specific order.

The problem might be due to using absolute(). Try the following and see if it still fails:



[This time I forgot to disable smilies!]
[ February 07, 2005: Message edited by: Jeanne Boyarsky ]

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Sree,
If you haven't already done so, please refer to the section entitled ResultSet Limitations in Oracle's JDBC User's Guide and Reference. Not all queries can produce updatable "ResultSet"s. As stated in the Oracle documentation, the Oracle JDBC driver will silently convert updatabale "ResultSet"s to read-only "ResultSet"s for such queries.

In your case, it looks like "select * from EMP" cannot produce an updatable "ResultSet".

By the way, the Oracle documentation also states that there may be problems in using "select *", and recommends using explicit column lists instead.

Perhaps you shoud [re?] read the Oracle documentation?

Good Luck,
Avi.
 
wood burning stoves
 
subject: problem with the resultset
 
Similar Threads
Try/Catch/Return
reusing the Statement object
transferring ResultSet from EJB to JSP/Java Class
multiple rows problem
Resultsets survives failure