MySQL JDBC query returns no response
When it's supposed to.
Code:
try{
PCSSafe.sql.result = PCSSafe.sql.sql_statement.executeQuery("SELECT * from pcs_config WHERE cfg_id = 1");
if(PCSSafe.sql.sql_statement.getFetchSize() == 0){
System.out.println("No results from config load");
}
PCSSafe.sql.result.next();
--> cassette[0].contents[0] = PCSSafe.sql.result.getInt("cfg_V1_1s");
cassette[0].contents[1] = PCSSafe.sql.result.getInt("cfg_V1_2s");
cassette[0].contents[2] = PCSSafe.sql.result.getInt("cfg_V1_5s");
cassette[0].contents[3] = PCSSafe.sql.result.getInt("cfg_V1_10s");
cassette[0].contents[4] = PCSSafe.sql.result.getInt("cfg_V1_20s");
cassette[0].contents[5] = PCSSafe.sql.result.getInt("cfg_V1_50s");
cassette[0].contents[6] = PCSSafe.sql.result.getInt("cfg_V1_100s");
cassette[0].balance = PCSSafe.sql.result.getFloat("cfg_V1_bal");
cassette[0].denomination = PCSSafe.sql.result.getInt("cfg_V1_denom");
cassette[0].field = PCSSafe.sql.result.getString("cfg_V1_field");
cassette[0].name = PCSSafe.sql.result.getString("cfg_V1_name");
} catch (Exception e){
System.out.println(e);
}
This does not return any results, but there is one entry in pcs_db.pcs_config and the same text copied and pasted into a mysql prompt returns the expected response. I have tested similar code on the log table and it dutifully returns data.
In the debugger, it gets to the code at the "--->" and there, the method just stops. No errors, no exceptions, just doesn't execute.
If someone can tell an annoyed noob where he's being a jackass, it'd be appreciated.
Thanks,
Annoyed Noob