File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes problem with scrolling the data of resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "problem with scrolling the data of resultset" Watch "problem with scrolling the data of resultset" New topic
Author

problem with scrolling the data of resultset

khurram mirza
Greenhorn

Joined: Jun 10, 2001
Posts: 25
i fetch record from database in resultset object.i've to go to last record,so when i use resultset.last() it throws SQL exception saying resultset is TYPE_FORWARD_ONLY.i tried to change this attribute using setFetchDirection(ResultSet.Unknown_Direction) but same exception appears.please help me how can i directly get to last record.
khurram mirza
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
In your createStatement() method, did you specify that you would like to scroll in both directions? Also, does your JDBC driver even support it?
Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: problem with scrolling the data of resultset
 
Similar Threads
Forward only ResultSet
Navigate through ResultSet
Couldn't access bean:define variable in action class using request.getAttribute
isLast method for result set is not working
problem with isLast()!