Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC and scrollable result set

Status
Not open for further replies.

bhunter

Programmer
Jul 27, 2000
36
US
Hopefully this is a simple question...

Is it possible to use a scrollable result set with the Oracle JDBC driver and move backwards as well as forward. I have been able to use it to move forward using next(), but I can't perform any other operations with it. Does the driver support it? Does the database support it? I am surprised if the database doesn't support a cursor that can do more than just move forward. Please fill me in on this stuff. BTW, I am looking for this information because I am trying to implement a page by page iterator for a GUI in a Java application. If you have any tips or advice on doing this that would also be appreciated.

Thanks,

Bennett
 
Some important information that I forgot to include. We are using Oracle 8i on Windows NT. We are using EJBs with and application server and connection pooling. The problem may have something to do with using the result set in this environment. I don't remember the exact error message when I tried to use absolute(), previous(), or relative(), but it was something to the affect that the operation could not be done on a result set that only supported forward scrolling. We followed the JDBC examples and API on the Sun web site to create the scrollable result set, and I'm sure that it was done properly.
 
I am 99 percent sure that Oracle doesn't support Scrollable cursors. So in your case its not a problem of JDBC.
I know Informix supports scrollable cursors...

Bad news !!! But cant help it.
But I am sure Java can handle it programmatically..(through good old array manipulation!!!)

Happy coding!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top