Hi, i'm new to
java and am trying to build a database program about boats which needs to output a .csv file. I have it all working except for one issue. It runs fine as shown below and, as expected, only outputs the first record. When i 'uncomment' the for statement it gives the error 'no data found' at line 205 (the first line that tries to access the database) during the second iteration. I know the database has data because it works without the for statement. I originally tried to do this with a do/while statement but that gave an invalid
string or buffer length error which is unsolvable (see
https://coderanch.com/t/491407/JDBC/java/Mircrosoft-Driver-Manager-Invalid-String). (I am running it on a windows 7 64 bit system).
The database has more than one record and should return null if there is no data in the field. The numrows value is correct and is found by moving the pointer to last then getRow() then moving it back using first().
Any help is much appreciated.