Well ... I did some classes, and it's time to connect to get a die in the bank; Okay. He had already connected with the DB, but when I did the class to fetch the data, it gets nullException, as if the database did not exist. Take out:
public void executeSQL(String sql){
try {
stm = conn.createStatement(rs.TYPE_SCROLL_INSENSITIVE,rs.CONCUR_READ_ONLY);
rs = stm.executeQuery(sql);
} catch (SQLException e) {
JOptionPane.showMessageDialog(null, "Erro:" + e);
}
}
Here I look like this:
csql.executeSQL("select * from usuarios");
then the error occurs (But of course I instantiated);
Help me, please.