I have the following problem, I try that, from a query that is saved in a ResultSet
enter the information of the query (returns a table) in a file txt
, the problem that arises is that keeps as it all the query, does not respect or spaces, or if they are different record or not.
My code is as follows
ResultSet rs;
rs =statement.executeQuery("select *from empleado;");
while(rs.next()){
for(i=1;i<11;i++){
linea=rs.getString(i);
pw.print(linea+"|");
System.out.print(linea);
}
}
I already tried to find a function with the variable ResultSet
or manipulate it with cycles but I can not find a way to separate records.