setupContextStack();
//now construct the delete where current of sql
try {
StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
CursorActivation activation = getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
//using quotes around the cursor name to preserve case sensitivity
deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");
LanguageConnectionContext lcc = getEmbedConnection().getLanguageConnection();
StatementContext statementContext = lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null, false);