다음을 통해 공유


DeliveryChannelArgument Constructor (DeliveryChannel, String)

Initializes a new instance of the DeliveryChannelArgument class with a DeliveryChannel object and a name.

네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
Public Sub New ( _
    deliveryChannel As DeliveryChannel, _
    name As String _
)
public DeliveryChannelArgument (
    DeliveryChannel deliveryChannel,
    string name
)
public:
DeliveryChannelArgument (
    DeliveryChannel^ deliveryChannel, 
    String^ name
)
public DeliveryChannelArgument (
    DeliveryChannel deliveryChannel, 
    String name
)
public function DeliveryChannelArgument (
    deliveryChannel : DeliveryChannel, 
    name : String
)

매개 변수

  • name
    A String of up to 255 characters specifying the argument name.

    You cannot change the name. To rename a delivery channel argument, you must remove the argument and then add a new argument that has the new name.

주의

Delivery channel arguments are dependent on the delivery protocol. Each protocol has its own requirements. For information about the arguments required by standard delivery protocols, see 표준 배달 프로토콜.

The following examples show how to define a file delivery channel and its arguments:

// Define a delivery channel that uses the built-in File protocol
DeliveryChannel fileChannel = 
    new DeliveryChannel(myInstance, "FileChannel");
fileChannel.ProtocolName = "File";

// Define and add arguments for the file delivery channel
DeliveryChannelArgument fileNameArg = 
    new DeliveryChannelArgument(fileChannel, "FileName");
fileNameArg.Value = sampleDirectory + 
    @"\Notifications\FileNotifications.txt";
fileChannel.DeliveryChannelArguments.Add(fileNameArg);

// Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel);
' Define a delivery channel using the built-in File protocol
Dim fileChannel As DeliveryChannel = _
    New DeliveryChannel(myInstance, "FileChannel")
fileChannel.ProtocolName = "File"

' Define and add arguments for the file delivery channel
Dim fileNameArg As DeliveryChannelArgument = _
    New DeliveryChannelArgument(fileChannel, "FileName")
fileNameArg.Value = sampleDirectory + _
    "\Notifications\FileNotifications.txt"
fileChannel.DeliveryChannelArguments.Add(fileNameArg)

' Add the file delivery channel to the instance
myInstance.DeliveryChannels.Add(fileChannel)

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

DeliveryChannelArgument Class
DeliveryChannelArgument Members
Microsoft.SqlServer.Management.Nmo Namespace

관련 자료

배달 채널 정의
Name Element for DeliveryChannel/Arguments/Argument (ICF)