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 Can ResultSet for a PreparedStatement be updateable? 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 "Can ResultSet for a PreparedStatement be updateable?" Watch "Can ResultSet for a PreparedStatement be updateable?" New topic
Author

Can ResultSet for a PreparedStatement be updateable?

Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
Hi Ranchers
Can resultset for a query executed from a Prepared statement be scrollable or updated? If so how or else why not?
I know it works for a statement:
Statement stmt = conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
However I learnt that there's a bug in MYSQL/JDBC connector that throws an exception when used on a query for tables from a different database. Does anybody has an idea where this bug is resolved.
Thanks
Ravi
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
This sounds like you have a couple distinct issues.
For the concurrecy question, try . Whether the driver you have will support it or not I cannot say.
I don't know about the MySQL bug that you cite. Do you unambiguously cite the database name in the query? From the MySQL online docs at http://camden-www.rutgers.edu/HELP/Internet/mysql/manual_Reference.html#Legal_names:
db_name.tbl_name.col_name Column col_name from table tbl_name of the database db_name. This form is available in MySQL Version 3.22 or later.

If the development teams know about such a bug in the driver, maybe you should check with them.
HTH,
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can ResultSet for a PreparedStatement be updateable?
 
Similar Threads
Does hibernate support Stored Procedure out parameters?
how can I get Record Count from ResultSet?
SQL Exception?
JdbcOdbcDriver/Stored procedures. Please help
Closing Statements