diff --git a/examples/udr/Triggers.cpp b/examples/udr/Triggers.cpp index d90e637ee1..4e9bcca834 100644 --- a/examples/udr/Triggers.cpp +++ b/examples/udr/Triggers.cpp @@ -199,7 +199,7 @@ FB_UDR_BEGIN_TRIGGER(replicate) FB_UDR_EXECUTE_TRIGGER { - ITransaction* transaction = context->getTransaction(status); + AutoRelease transaction(context->getTransaction(status)); // This will not work if the table has computed fields. stmt->execute(status, transaction, triggerMetadata, newFields, NULL, NULL); @@ -306,7 +306,7 @@ FB_UDR_BEGIN_TRIGGER(replicate_persons) FB_UDR_EXECUTE_TRIGGER { - ITransaction* transaction = context->getTransaction(status); + AutoRelease transaction(context->getTransaction(status)); stmt->execute(status, transaction, triggerMetadata, newFields, NULL, NULL); }