// try to remember the SQL statement in case anybody asks for it
SQLText = sql;
try {
Activation activation;
try {
PreparedStatement preparedStatement = lcc.prepareInternalStatement
(lcc.getDefaultSchema(), sql, resultSetConcurrency==JDBC20Translation.CONCUR_READ_ONLY, false);
activation =
preparedStatement.getActivation(lcc, resultSetType == JDBC20Translation.TYPE_SCROLL_INSENSITIVE);
checkRequiresCallableStatement(activation);
} catch (Throwable t) {
throw handleException(t);
}
// this is for a Statement execution
activation.setSingleExecution();
//bug 4838 - save the auto-generated key information in activation. keeping this
//information in lcc will not work work it can be tampered by a nested trasaction
if (autoGeneratedKeys == JDBC30Translation.RETURN_GENERATED_KEYS)
activation.setAutoGeneratedKeysResultsetInfo(columnIndexes, columnNames);
return executeStatement(activation, executeQuery, executeUpdate);
} finally {
restoreContextStack();
}
}