Results 1 to 2 of 2
- 08-19-2010, 11:10 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 1
- Rep Power
- 0
MySQL JDBC query returns no response
When it's supposed to.
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.Java 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); }
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 NoobLast edited by PDXErik; 08-19-2010 at 11:24 PM.
- 08-20-2010, 09:07 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Not getting a response for query
By Kelly in forum JDBCReplies: 3Last Post: 04-20-2010, 03:41 AM -
Query MySQL
By boss in forum Advanced JavaReplies: 3Last Post: 01-04-2010, 09:35 AM -
MySQL/JDBC Mysql query output
By thelinuxguy in forum Advanced JavaReplies: 4Last Post: 02-13-2009, 01:57 AM -
MySQL/JDBC Prepared Statement Select query
By thelinuxguy in forum Advanced JavaReplies: 4Last Post: 02-12-2009, 05:29 PM -
Mysql/JDBC update query problem
By thelinuxguy in forum Advanced JavaReplies: 3Last Post: 02-11-2009, 09:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks