i have 1000 records in resultset, how to get first 100
records from resultset, because resultset fetch all 1000
records at a time?

Answer Posted / sumit

The question is not pretty clear. However, before retriving the records from the database if you want to make sure you get only 100 records in one hit. U can use the following API after creating the statement object.

Statement.setFetchSize(100);

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we store the file in the oracle database?

526


There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?

626


Where jdbc drivermanager class is used?

538


What are the different types of JDBC drivers?

630


How many rowset are available in jdbc?

673






What is the use of jdbc api?

515


java based application for hospital management

3455


What is JDBC Statement?

577


How many types of jdbc drivers are there?

563


What is the difference between jdbc and odbc?

536


What do you mean by two phase commits?

573


How does jdbc driver work?

541


Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?

553


What are the advantages of using jdbc datasource?

507


What is use of connection pooling?

530