Label does not return the value extracted from a database

0

I'm trying to get a value from a base by means of a query and show it through a label all this happens at the click of a button

try{ 
    String carne = txtcarnet.getText();//Se crea un string que captura el carnet ingresado
    Restablecer_Contrasena res;//Se crea un objeto "res" de la clase Restablecer_Contrasena
    res = new Restablecer_Contrasena();//Se intancia el objeto

    ResultSet rs = res.Restablecer(carne);//Se llama al metodo restablecer pasando el parametro "carnet"
        lblpass.setText(rs.getString("rs"));

    }catch (SQLException ex) {
        Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
    }

In this line lblpass.setText (rs.getString ("password")); is where I am presenting the problem

    
asked by DMya 26.03.2018 в 23:15
source

0 answers