Alright, so heres a weird one for you, when I try the following:
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT * FROM usermap");
rs.next();
I get the following exception:
java.sql.SQLException: Column Index out of range, 0 < 1
Now here's where it gets weird, when I try this command:
rs.getMetaData().getColumnCount()
I get 29, and when I try this command
s.execute("SELECT * FROM usermap")
it returns true. Now here is where it gets really, really weird. When I execute the same query in the main method, if works just fine. It's just when I embed the command in the method of an object.
I have the latest versions of both mysql and the connector.
Can anyone help me with this?
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT * FROM usermap");
rs.next();
I get the following exception:
java.sql.SQLException: Column Index out of range, 0 < 1
Now here's where it gets weird, when I try this command:
rs.getMetaData().getColumnCount()
I get 29, and when I try this command
s.execute("SELECT * FROM usermap")
it returns true. Now here is where it gets really, really weird. When I execute the same query in the main method, if works just fine. It's just when I embed the command in the method of an object.
I have the latest versions of both mysql and the connector.
Can anyone help me with this?