Passing Parameters to an Asynchronous Event
Sample code:
DECLARE @EventParmId AS UNIQUEIDENTIFIER = NEWID()
EXEC InsertEventInputParameterSp @MyEventParmId, 'Parameter1', @Variable1
EXEC InsertEventInputParameterSp @MyEventParmId, 'Parameter2', @Variable2
EXEC InsertEventInputParameterSp @MyEventParmId, 'OutParameter3', NULL, 1
DECLARE @SessionID AS UNIQUEIDENTIFIER = dbo.SessionIDSp()
DECLARE @Unused AS BIT = 0
DECLARE @Result EventResultType
DECLARE @Infobar InfobarType
EXEC dbo.FireEventSp
@EventName = 'MyEvent',
@ConfigName = 'MyConfiguration',
@Initiator = 'MyInititator',
@SessionID = @SessionID,
@EventParmId = @MyEventParmId,
@EventTrxId = NULL,
@Transactional = 0,
@GeneratingEventActionStateRowPointer = NULL,
@AnyHandlersFailed = @Unused OUTPUT,
@Result = @Result OUTPUT,
@Infobar = @Infobar OUTPUT