diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp index 579c547651..6892c2cba2 100644 --- a/examples/udr/Triggers.cpp +++ b/examples/udr/Triggers.cpp @@ -182,8 +182,8 @@ FB_UDR_BEGIN_TRIGGER(replicate) strcat(buffer, outSqlDa->sqlvar[0].sqldata + sizeof(short)); strcat(buffer, "';\nend"); - IAttachment* attachment = context->getAttachment(status); - ITransaction* transaction = context->getTransaction(status); + AutoRelease attachment = context->getAttachment(status); + AutoRelease transaction = context->getTransaction(status); stmt.reset(attachment->prepare(status, transaction, 0, buffer, SQL_DIALECT_CURRENT, 0)); @@ -289,8 +289,8 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons) strcat(buffer, outSqlDa->sqlvar[0].sqldata + sizeof(short)); strcat(buffer, "';\nend"); - IAttachment* attachment = context->getAttachment(status); - ITransaction* transaction = context->getTransaction(status); + AutoRelease attachment = context->getAttachment(status); + AutoRelease transaction = context->getTransaction(status); stmt.reset(attachment->prepare(status, transaction, 0, buffer, SQL_DIALECT_CURRENT, 0));