0
I would like to recover the name of my java tables with mysql database. I don’t know if it’s correct I get a hashcode: (1) model.Campanhas@b 5cca49 (2) model.Campaigns@5c369e04
 public ArrayList<Object>  nameTables(){
    try {
        String SQL = "SHOW tables";
        PreparedStatement ps = dataSource.getConexao().prepareStatement(SQL);
        ResultSet rs = ps.executeQuery();
        System.out.println("TABELAS CONSULTADAS COM SUCESSO");
        ArrayList<Object> lista = new ArrayList<>();
        while(rs.next()){
           Pedidos pedidos = new Pedidos();
           pedidos.setNomePedidos(rs);
           lista.add(pedidos);
        }
        rs.close();
        return lista;
     } catch (SQLException ex) {
        System.err.println("ERRO AO PESQUISAR TABELAS: "+ex);
    }
    catch (Exception ex){
        System.err.println("ERRO GERAL AO PESQUISAR TABELA: "+ex);
    }
    return null;
}
Thanks, thanks to your reply I got the solution. since other things were also wrong. There when I put what you said already accused the error. Ai just been fixing. Vlw same.
– Renato Alcantara