1. String sql1 = "select count(*) AS cont from distribuicao where pro_codigo = ?";
2. PreparedStatement ps1 = con.prepareStatement(sql1);
3. ps1.setInt(1, id);
4. ResultSet rs1 = ps1.executeQuery();
5.
6. Integer i = rs1.getInt("cont");
7.
8. System.out.println(i);
nao consigo pegar o resultado do contador
se alguem puder me ajudar
muito obrigado
erro:
com.microsoft.sqlserver.jdbc.SQLServerException: The result set has no current row.