staroski
Cawende
error: cannot find symbol
rs = stm.executeQuery(sql);
symbol: method executeQuery(String)
location: variable stm of type Statement
1 error
import java.beans.Statement;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
matheus.cirillo
public void excutaSQL(String sql) throws SQLException{
Statement stm = (Statement) conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=stm.executeQuery(sql);
}
Solucao aceita
Cawende
Já descubri era o problema do import java.beans.Statement que esta a usar ao invés de import java.sql.Statement;
staroski 1 like
matheus.cirillo