//using quotes around the cursor name to preserve case sensitivity
deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
IdUtil.normalToDelimited(getCursorName()));
// Context used for preparing, don't set any timeout (use 0)
statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
// Get activation, so that we can get the warning from it
Activation act = ps.getActivation(lcc, false);
statementContext.setActivation(act);