0
I have a java desktop application with netbeans connecting via JDBC, and I have a class that connects to a database and returns some items that are stored there. I’d like to exhibit a progressBar
As the bank connection is established, does anyone have any examples of how I can do this?
This is the method that executes and freezes the screen:
public ResultSet informacoesDiarias(String dataInicial,String dataFinal) {
conn = new ConexaoBD().getConexao();
String sql = "SELECT * from producaoDiara WHERE dataProducao BETWEEN '" + dataInicial +" 'AND' " +dataFinal+ "'";
try {
st = conn.createStatement();
rs = st.executeQuery(sql);
} catch (SQLException ex) {
System.err.println("Erro do capiroto:"+ex.getMessage()+"\ntipo:"+ex.getClass());
}
return rs;
}
I wish that when I called this method the progress bar would appear.
Related: How to use Jprogressbar in Arraylist comparison classes? and Update Jtable after each data change in a cell
– user28595
Welcome to SOPT. First of all, add a [mcve] of your code so you can analyze the doubt. See the links above too.
– user28595
Read this: Injection of SQL
– Victor Stafusa
Thanks @diegofm for the tips
– Robson Murilo