pessoal ao invés de usar :
executeUpdate
st.executeQuery
posso usar somente:
execute
Rocha
pessoal ao invés de usar :
executeUpdate
st.executeQuery
posso usar somente:
execute
Rocha
Tem que ler a documentação: http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html
boolean execute(String sql)
Executes the given SQL statement, which may return multiple results.
executeQuery(String sql)
Executes the given SQL statement, which returns a single ResultSet object.
int executeUpdate(String sql)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
se vc olhar em http://java.sun.com/j2se/1.4.2/docs/api/
vai ver que eles tem retornos diferentes.
cada um deles tem uma finalidade.
da uma lida nas docs.
[]'s