Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with ResultSet.CONCUR_UPDATABLE

 
valluri venkata reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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
con.setAutoCommit(false);
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");
}
else{
System.out.println("???");
}
System.out.println here it is showing that ResultSet is CONCUR_READ_ONLY
Any help greatly appreciated
Thks
Venkat
 
Rudy Dakota
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
Cheers,
Rudy.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic