MessageQueueTask.StringMessageToVariableName Property

Gets or sets the name of the variable to which the message contents are saved.

Namespace:  Microsoft.SqlServer.Dts.Tasks.MessageQueueTask
Assembly:  Microsoft.SqlServer.MSMQTask (in Microsoft.SqlServer.MSMQTask.dll)

public string StringMessageToVariableName { get; set; }

Property Value

Type: System.String
A String that contains the variable to store the message in.

Implements

IMessageQueueTask.StringMessageToVariableName

This method is used only when the MSMQ task is receiving mail. The contents of the message are stored in a variable.

The following code example adds a variable to the package, and specifies that the variable be used for storing the message contents.

myPackage.Variables.Add("ReceiveMessageVariable", false, "", "empty");
myMSMQTask.StringMessageToVariableName = "ReceiveMessageVariable";

Community Additions

ADD
Show: