Código:
Pero no me arroja ningun resultado cuando regreso la variable id, donde me estoy equivocando?public String obtenerIDUsuario(){
String id = "";
try {
Statement st = adaptador.createStatement();
ResultSet rs = st.executeQuery("SELECT MAX(No_empleado) FROM usuario");
while (rs.next()){
id = rs.getString("No_empleado");
}
rs.close();
st.close();
} catch (SQLException e) {
//e.printStackTrace();
}
return id;
}
Gracias y saludos


Este tema le ha gustado a 1 personas