I\'m trying to call a mySQL stored procedure from my Java application. When I call the stored procedure from mySQL workbench, it works and I get the correct number of rows depen
public void mostrarDatos()
{
try {
Connection con = null;
con = getConnection();
CallableStatement cs;
cs = con.prepareCall("{CALL comprobarUsuario(?,?,?)}");
cs.setString(1,"Jorge" );
cs.setString(2, "1627Jorge");
cs.registerOutParameter(3, Type.INT);
cs.execute();
ResultSet rs2 = cs.getResultSet();
if(rs2.next()){
System.out.println(true);
}
int resultado = cs.getInt(3); // check whether the column name is correct
System.out.println(resultado);
con.close();
} catch (Exception e) {
}
}