This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
i'm having trouble with a jdbc-odbc connection to an access database. in a function, i call a sql query, initialize an array to the size of the query by using result.last() and then result.getRow(), and then use .beforeFirst() before i start looping through the resultset to add each row to the array. i have done this successfully before within the same program, but for some reason it is now giving me trouble. whenever i call the .getString("columnname") function and try to use the returned value as a parameter, or assign it to another variable, i get "java.sql.SQLException: No data found". code below. any help greatly appreciated.
use the [CODE] tags - it makes it much easier for people to help you.
Joined: Apr 24, 2002
i found the problem: the jdbc-odbc driver requires that the columns are accessed in order. so, if in the db, the columns are "id,name,phonenumber" and in the code you try to getString("name"),getInt("id") it blows up.