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 ResultSet.CONCUR_UPDATABLE 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 ResultSet.CONCUR_UPDATABLE" Watch "problem with ResultSet.CONCUR_UPDATABLE" New topic
Author

problem with ResultSet.CONCUR_UPDATABLE

valluri venkata reddy
Greenhorn

Joined: Jul 23, 2002
Posts: 2
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

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 .
Cheers,
Rudy.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with ResultSet.CONCUR_UPDATABLE
 
Similar Threads
ResultSet Sensitive and Concurrent Updatable Problem
updatable recordsets in SYBASE
updateXXX function of ResultSet ....???
Problem in ResultSet
Scrollable ResultSet not working