This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Using scrollable resultset in stored procedures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Using scrollable resultset in stored procedures" Watch "Using scrollable resultset in stored procedures" New topic
Author

Using scrollable resultset in stored procedures

Manish Chhetri
Greenhorn

Joined: Oct 31, 2003
Posts: 11
Hi
I wanted to know if we could use scrollable(forward and backward) resultset for stored procedures. If yes, could i have a link or a sample code which tells me more about it.


The One..
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
There's a version of Connection.prepareCall() that takes resultSetType and resultSetConcurrency parameters, so I don't see why not as long as your driver supports JDBC 2.0. I've never tried it myself; why don't you give it a go?

Jules
Manish Chhetri
Greenhorn

Joined: Oct 31, 2003
Posts: 11
It is of type forward only...that is the problem
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
If you are able to wait to J2SE 5.0 the implementations of the new RowSet interface are able to provide a Resultset scrollable even though the driver is not. RowSet extends ResultSet.
I haven't tried it but have a look at JdbcRowSet

And RowSet Tutorial


SCJP2. Please Indent your code using UBB Code
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Manish,

Can you post a code fragment? Which JDBC driver are you using?
 
Don't get me started about those stupid light bulbs.
 
subject: Using scrollable resultset in stored procedures