It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes ResultSet Fnction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ResultSet Fnction" Watch "ResultSet Fnction" New topic

ResultSet Fnction

Srinivasa Vallabha

Joined: Mar 08, 2001
Posts: 15
hi all,
Please help me.
When we get ResultSet say "rs" from the database, we usually get the data or records from this by using function right ?
but when we go thru the specifiction of ResultSet we will find rs.previous(), rs.last(), rs.first().....functions.
I am using JRUN 3.0 when I tried to use rs.previos() function it gives an exception as given below.
So please tell me which Server supports all the above said functions ?
Thankx in Advance to all folk's
hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
Hi Srini
I do not think the container in which u run has any effect on the functions of recordset.
u have to implement a fully scrollable recordset if u req previous,last... functionality for recordsets.
Pass appropriate arguments in the createStatement(). for ex
Now u can user the previous,last,first methods after opening the recordset.
Hope this helps
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Make sure the JDBC drivers you are using support JDBC 2.0 functionality.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Raja Shekhar
Ranch Hand

Joined: Apr 02, 2001
Posts: 49
How Shold i make sure that
My driver Support JDBc2.0 functionality..
Please Eloboarate...

Srinivasa Vallabha

Joined: Mar 08, 2001
Posts: 15
hi Raj,
Look I am using JRUN3.0 ok.
When I create a Result Object and access the Database, Its working fine. And I can also able access the Records by using function.
But when I want to use the rs.previos() | rs.last() | rs.first() function of the ResultSet.
I am getting an Exception Saying that Unsupported operation.
So somebody told me that I have to check out for JDBC2.0 functionalities in my JDBC:ODBC rivers.
So how can use these functions ? Tell me (if possible thru some code)
Thanx in advance
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
Sounds like you are using a JDBC ver 1.0 driver.
I think you should review the java.util package...
Pls review the List, Iterator, & ListIterator classes.
After reviewing the doc. If you have any questions Pls ask away.
ttfn Monty
Multi-Platform Database Developer ( on E.S.T. )

Multi Platform Database Developer & DBA on E.S.T.
I agree. Here's the link:
subject: ResultSet Fnction
jQuery in Action, 3rd edition