File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes problem with ResultSet.CONCUR_UPDATABLE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "problem with ResultSet.CONCUR_UPDATABLE" Watch "problem with ResultSet.CONCUR_UPDATABLE" New topic

problem with ResultSet.CONCUR_UPDATABLE

valluri venkata reddy

Joined: Jul 23, 2002
Posts: 2
Even though I set CONCUR_UPDATABLE for ResultSet thru "con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE)"
it is stll showing that it has been set to CONCUR_READ_ONLY
Here is my code
stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT * FROM DOCSHARE WHERE DOCSHARE_NO = 37");

int concur = rs.getConcurrency();
if (concur==ResultSet.CONCUR_READ_ONLY){
System.out.println("ResultSet is CONCUR_READ_ONLY");
else if(concur==ResultSet.CONCUR_UPDATABLE){
System.out.println("ResultSet is CONCUR_UPDATABLE");
System.out.println here it is showing that ResultSet is CONCUR_READ_ONLY
Any help greatly appreciated
Rudy Dakota
Ranch Hand

Joined: Jul 27, 2002
Posts: 54
Hi there,
A number of drivers have implemented these properties in such a way that you can not set all combinations of srolling behaviour and updateability. When you try and set a combination that the builder doesn't support, the driver will more or less silently ignore this and switch to the behaviour that is implemented .
In your case I would at least have a good look at the documentation for your driver.
Hint: it might have helped if you had mentioned what driver you are using .
I agree. Here's the link:
subject: problem with ResultSet.CONCUR_UPDATABLE
It's not a secret anymore!