This is a simple code print some rows from a Database. but When I execute this nothing is print on screen. I figured that the problem is rs.next()
method is ski
Thanks for every answers. I found that putting rs.relative(-1)
also does the job. But above answers are well coded and better than mine. So thanks all. I'm a newbie to programming I will consider all your advice in my coding. Thanks
if (rs.next()) {
rs.relative(-1);
while (rs.next()) {
System.out.print(rs.getString("idUser") + " ,");
System.out.print(rs.getString("Name") + " ,");
System.out.print(rs.getString("Email") + " ,");
System.out.println(rs.getString("country") + " .");
}
}