In real time applications...how much use of scrollable resultsets is made..
Any scenario where we have to go for scrollable sets than non scrollable resultsets..
Thanks & Regards
Maximilian Xavier Stocker
Joined: Sep 20, 2005
Originally posted by A Kumar: Hi all, In real time applications...how much use of scrollable resultsets is made..
Hard question to answer definitively but I would say very little. I couldn't remember the last time I used a scrollable result set in anything (either JDBC or ODBC or ADO), years anyway.
Often for well designed code I would say they are not required. One of the major uses appears to be people looking for row counts but that's not really a very good use of them.
I think largely if you really must have a scrolling result you are probably better off with a CachedRowSet anyway.
But as I said these aren't really hard and fast rules, in my opinion though there isn't much use for them.
Joined: Jul 04, 2004
So we can use the non-scrollable ..ones for our work.. rarely needing the scrollable resultsets
Joined: Dec 15, 2005
I second the previous post.
In addition, this is in part because in at least some of the major database, scrolling result sets either don't perform particularly efficiently, or because the entire result set gets cached by the driver in memory, or both.
In other words, they're best used for small results, and for small results is often easier to use a non-scrollable anyway and convert each row to a Java object; there's just not that much benefit.
In the long run, if DB vendors and driver writers improve the driver implementations substantially, scrollables could be a lot more usable...
It's certainly possible to use them in a limited way, and I suppose there may be a driver implementation out there that works well, but it's not something I'd generally recommend to beginners (if they'd listen to me); you have to know a lot about how the underlying implementation is really doing things, or restrict yourself to toy or small-scale projects.