Is there a way, in JDBC, to execute a generic query ? I mean run something like execute(String strSql) where strSql could be a SELECT, an INSERT, an UPDATE,a CREATE,... or whatever.
If no, how would you fix this up ?
Proposed solution:
@Override
public void execQuery(String Query) throws SQLException {
this.statement = this.connection.createStatement();
if (this.statement.execute(Query)) {
this.resultset = this.statement.getResultSet();
}
}