Well, I have the problem that I want to get the records of a simple select * from table, but it tells me that it does not get any record
The query code
ConexionBD("eduware", "root", "", "3306");
Conexion();
this.conexion = Conexion();
if(this.conexion!=null){
this.stmt = this.conexion.createStatement();
rs=this.stmt.executeQuery("SELECT * FROM alumno");
JOptionPane.showMessageDialog(null,rs.getRow());
if(rs.getRow()!=0){
JOptionPane.showMessageDialog(null," Ejecutada Con Exito");
}
else{
JOptionPane.showMessageDialog(null," Ejecutada Sin Exito");
}
It does everything except at the moment of the if condition, since at that moment it goes through the part that the query has not been done successfully and the message from rs.getRow is as follows:
So I also put a message to see if it had connected to the database and I set the following:
The table does contain information and data about 6 complete records.