This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCROLLABLE RESULTSET PROBLEM

 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I've got a problem getting my resultset to be scrollable.
I'm using Tomcat 4.0, MySQL, on W98.
All other stuff seems to work( up to my poor sql level anyway).
This is the line that causes runtime (not compiler) error:
Statement s = DBConx.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE , ResultSet.CONCUR_UPDATABLE ) ;
The code is fine - I copied it from the Resultset documentation!
Any ideas? Perhaps MySQL doesn't support scrollable results? If not what free db can I use?
Thanks,
Terry
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just to clarify an issue, it is not the database that dictates whether a resultset can be scrollable or not, it is the jdbc driver which determines that. If you are using the type 4 driver to access the mySQL db, then you shouldn't have any problems. If you are using the jdbc dbc bridge, then you will have problems no matter which database you use.
So my question is which driver are you using? Is it throwing a SQLException? If so, which one?
Jamie
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
This is the driver code:

I'm sure the documentation for the driver says its a class 4 driver.
The error message in the errorPage is this

Hope that will help you help me.
Thanks,
Terry
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you may be right. Check to make sure you have the latest release of the jdbc driver at http://mmmysql.sourceforge.net/ . If the error still persists
I guess your out of luck. Unfortunately I don't use mySQL so I can't recommend a driver for you that supports scrollable resultsets for mySQL databases.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic