Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC JDBC doesn't provide an EOF method.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Clark
JDBC doesn't provide an EOF method.
1 Answer(s)      4 years and 2 months ago
Posted in : JDBC


How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?


Advertisement
View Answers

November 15, 2010 at 10:54 AM


Hi friends,

You can solve this problem of different method of ResultSet class. It is present in java.sql.ResultSet package.

Answer1 :- With the help of last() method of ResultSet class you can reach end of the current result set. If your result set is scrollable.

Answer 2:- You can also use isLast() as you are reading ResultSet.

One thing to keep in mind, though, is that both methods tell you that you have reached the end of the current ResultSet, not necessarily the end of the table. SQL and RDBMSes make no guarantees about the order of rows, even from sequential SELECTs, unless you specifically use ORDER BY. Even then, that doesn't necessarily tell you the order of data in the table.

Thanks.



Related Tutorials/Questions & Answers:
JDBC doesn't provide an EOF method.
JDBC doesn't provide an EOF method.  How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method
Advertisements
JDBC Batch executeBatch() Method Example
JDBC Batch executeBatch() Method Example: In this example, we can evaluate executebatch() method of the jdbc batch processing. The executebatch() method...;    "jdbc:mysql://localhost:3306/roseindia_jdbc
JDBC Batch commit method Example
JDBC Batch commit method Example: In this example, you can learn what is setAutoCommit() method and commit() method in the jdbc batch processing and how it work?. The setAutoCommit() method used to set created connection auto commit
profile doesn't match application identifier
profile doesn't match application identifier  profile doesn't match application identifier
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist
' doesn't exist  Hi, I am developing an application using JPA 2.1... 'jpa.sequence' doesn't exist Error Code: 1146 Call: UPDATE SEQUENCE SET SEQ...] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method
Sun's JDBC-ODBC driver does not implement the getPrimaryKeys() method for the DatabaseMetaData Objects.
Sun's JDBC-ODBC driver does not implement the getPrimaryKeys() method...) for an Access Database table? Sun's JDBC-ODBC driver does not implement the getPrimaryKeys() method for the DatabaseMetaData Objects
NoughtsAndCrossesGame play button doesn't work
NoughtsAndCrossesGame play button doesn't work   /* * To change this template, choose Tools | Templates * and open the template in the editor...(); // Set some JFrame details // NOTE - In grid layout you provide
NoughtsAndCrossesGame play button doesn't work
NoughtsAndCrossesGame play button doesn't work   /* * To change this template, choose Tools | Templates * and open the template in the editor...(); // Set some JFrame details // NOTE - In grid layout you provide
Why doesn't Java allow overriding of static methods?
Why doesn't Java allow overriding of static methods?  Why doesn't Java allow overriding of static methods
SQL select statement doesn't return any rows,
SQL select statement doesn't return any rows,  When an SQL select statement doesn't return any rows, is an SQLException thrown
String fromCharCode() method example in Action Script3
.style1 { font-size: medium; } String fromCharCode() method example in Action Script3:- String provide a method to find characters by the character code using fromCharCode() method. we have define a string using this method
why set doesn't allow duplicate value
why set doesn't allow duplicate value  HI Everyone Any one can help me why set not allowed duplicate value in java. Please post ur comment, its urgent. Thanks in advance
hello .. still doesn't run - Java Beginners
hello .. still doesn't run  Iam still having a prblem in running... Scanner another error is can not resolve symbol method setname(java.lang.String... the method of Scanner coz i need to read integers numbers or any other kind
Spring JDBC Introduction
Spring JDBC Introduction The Spring's DAO(Data access object) make it easy for us to use data access technologies like JDBC, Hibernate, JPA or JDO... catching exception that are related to each technology. This tutorial provide
jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe
please provide the code
please provide the code   Develop a multi-client chat application
MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist
MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist  MySQL issue: Table 'datadictionary.CHARACTERSETS' doesn't exist
Please provide the code
Please provide the code   Write a program to recursively download the web pages available in the given site URL
If statement doesn't work ,(doesn't print alert message when user dont field name and email)
If statement doesn't work ,(doesn't print alert message when user dont field name and email)  I've created some if / else statements to get a download when a user hit click jf he fields name and email but doesn"t work for my site
Please provide the code
Please provide the code   Program to find depth of the file in a directory and list all files those are having more number of parent directories
Provide the code please
Provide the code please   Program to calculate the sum of two big numbers (the numbers can contain more than 1000 digits). Don't use any library classes or methods (BigInteger etc
Please provide the code
Please provide the code   Create a file system: We just have one file on the hard disk. But we can create directories, sub-directories and files in that file only
method
method   how and where, we can define methods ? can u explain me with full programme and using comments
Please provide the coding for this problem
Please provide the coding for this problem  Please provide the coding for the following problem. Write a "hangman" game that randomly generates a word and prompts the user to guess one letter at a time. Each letter in the word
method
method  can you tell me how to write an abstract method called ucapan() for B2 class class A2{ void hello(){ system.out.println("hello from A2"); }} class B2 extends A2{ void hello(){ system.out.println("hello from B2
provide source - Java Beginners
provide source  please provide code for this program Write a program to download a website from a given URL. It must download all the pages from that website. It should take the depth of retrieval from the user input. All
provide me the program for that ques.
provide me the program for that ques.  wtite a program in java there is a class readchar.the functionality of this class is to read a string from the console and display the characters of that string on the console.   
MySQl 5.5 doesn't truncate VARCHARs when they're longer than expected
MySQl 5.5 doesn't truncate VARCHARs when they're longer than expected  MySQl 5.5 doesn't truncate VARCHARs when they're longer than expected
provide code - Swing AWT
provide code  Dear frnds please provide code for two player CHESS GAME.....using swings,awt concepts   Hi friend, import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; public
jdbc
jdbc  i had written jdbc connection in method and i need to get connection in another class?   import java.sql.*; class... driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/test
Advertisements
 

 

 

DMCA.com