Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/10/2010, 23:42
Avatar de webness
webness
 
Fecha de Ingreso: enero-2009
Ubicación: BOGOTA
Mensajes: 312
Antigüedad: 15 años, 3 meses
Puntos: 5
Respuesta: DEVOLVER UN HashMap

YA ME LA PILLE

public HashMap[] getUsers() throws SQLException
{
HashMap hm[] = new HashMap[100];
int i = 0;
String strSQL = "SELECT * FROM users ORDER BY pk_user DESC";

this.st = this.co.createStatement();
this.rs = this.st.executeQuery(strSQL);

while(this.rs.next())
{
hm[i] = new HashMap();
hm[i].put("login", this.rs.getString("login"));
hm[i].put("password", this.rs.getString("password"));
i++;
}
return hm;
}