I want to append data of two tables in a resultset. I have tried the below code but not getting the desired output only the first resultset data i.e. the first table data
I am getting Count as 0 in all three places Guide me please.
But... the getRow() method returns the current row number. Which will always be zero when you haven't read any rows from the ResultSet, as in the code posted.
Happy S Singh
Ranch Hand
Joined: Nov 14, 2011
Posts: 47
posted
0
Okay.I got about getRow().
Now how to append the result in CSV file.
Paul Clapham wrote:But... the getRow() method returns the current row number. Which will always be zero when you haven't read any rows from the ResultSet, as in the code posted.
Yeah, I mis-read the method name (I thought is was getRows()) and was gonna edit my post. Stopped when I saw responses so it wouldn't be ninja-editing.
If you want to append to a file, then you should use the FileWriter constructor with the parameter which specifies that. The constructor you chose always overwrites the data in the file, if it already exists.