I have made the connection with MS-access database in Java , my data base consists of 400,000 records. I have seen only 5629 records in the java console. I need to display all the data in the console for the column 3 in the data base and i don't know what is the reason for getting only 5629 records ??? my code is :-
import java.sql.*;
public class DataBaseConnection {
public static void main(String[] args) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:DEVELOPER");
System.out.print("connection is successful");
Statement stat=con.createStatement();
ResultSet res=stat.executeQuery("SELECT * FROM data");
int index=0;
while (res.next())
{
System.out.println(res.getString(3));
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}