This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can ResultSet for a PreparedStatement be updateable?

 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic