Hello everybody:
I have a problem with a result set too. ResultSet doesn't get all data store in my table, the cursor start in the third row, so I miss rows 1 and 2. How can I put the cursor in the first row in a TYPE_FORWARD_ONLY result set? Here is my code:
TDepartamento dpto = new TDepartamento();
ArrayList<TDepartamento> listaDptos = new ArrayList<TDepartamento>();
try {
sql = "Select * from Departamento order by idDpto";
statement = TConexion.getConexion().prepareStatement(sql);
ResultSet rs = statement.executeQuery();
while (rs.next()){
dpto.setCodigo(rs.getInt("CodigoDpto"));
dpto.setDpto(rs.getString("Dpto"));
listaDptos.add(dpto);
}
return listaDptos;
}
sorry for my english and thank you