I want to get the results from my query. I get the ResultSet with next() = true. But when I do getString() I get the following error: "Incorrect cursor status: indicated cursor is not positioned in a row for UPDATE, DELETE, SET, or GET statement:; Current position of the query result is after the last record"
My query returns 1 row of results.
My code is:
ResultSet rs = ejecutarSentencia("SELECT ITEM "
+ "FROM STORE"
+ "WHERE REF = '"+ref+"';");
if (rs.next()) {
String item = rs.getString(rs.findColumn("ITEM"));
}
The error message is: "net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.4 Incorrect cursor status: indicated cursor is not positioned in a row for UPDATE, DELETE, SET, or GET statement:; Current position of the query result is after the last record"
when I execute the line:
String item = rs.getString(rs.findColumn("ITEM"));