Your first problem is that you don't know what your problem is...
To solve this problem, and get to solve the real issue, instead of this
catch(Exception e)
{
e.getMessage();
}
Use
catch(Exception e)
{
e.printStackTrace();
}
And please paste the full stack trace this produces...
EDIT As OP stated in a comment:
there is no data found exception thrown
This means that there is no data to be read. Which is a known case for MS Access:
This typically occurs when you try to read the value of a column multiple times.
So you should only read every value once! To fix the imediate issue, comment the System.out.println() line here
...
rs.next();
// comment this:
// System.out.println(rs.getInt(1) + "\t" + rs.getInt(2) + "\t" + rs.getInt(3) + "\t" + rs.getInt(4) + "\t" + rs.getInt(5) + "\t" + rs.getInt(6));
for (i = 2; i < 7; i++)
...
And be careful, as you call getInt() for the same index two times in the loop, which has to be corrected:
for (i = 2; i < 7; i++)
{
System.out.println("hello");
if (rs.getInt(i) < min) { // getInt()
index = i;
min = rs.getInt(i); // second getInt() call for same index --- throws exception
}
}
Correct:
for (i = 2; i < 7; i++)
{
System.out.println("hello");
int value=rs.getInt(i); // getInt() call, put into local variable
if (value < min) {
index = i;
min = value; //just use local variable - OK
}
}