I need access to the database ACCESS, the query is accessing correctly, but I noticed that to have the information return, JAVA first reads and all tables and all data, is it? does not have a way of doing the query only what is requested?
DAO Class:
// Filename
String filename = "\\arquivo.mdb";
String url = "jdbc:ucanaccess://" + filename.trim();
// Realiza a conexão com o banco de dados
String usuario = "";
String senha = "";
conexao = DriverManager.getConnection(url, usuario, senha);
return conexao;
a Query:
PreparedStatement ps = connection.prepareStatement("SELECT * FROM ATENDIMENTO");
ResultSet rs = ps.executeQuery();
while (rs.next()) {
System.out.println(rs.getString("DATA"));
System.out.println(rs.getString("CLIENTE"));
}