次の方法で共有


SubscriberDevice.Add Method

Notification Services データベースにサブスクライバ デバイス レコードを追加します。

名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)

構文

'宣言
Public Sub Add
public void Add ()
public:
virtual void Add () sealed
public final void Add ()
public final function Add ()

使用例

Add メソッドを使用してサブスクライバ デバイスを追加する例を次に示します。

Dim instanceName As String = "Tutorial"

' Create the NSInstance object.
Dim testInstance As New NSInstance(instanceName)

' Create the SubscriberDevice object.
Dim testSubscriberDevice As SubscriberDevice = _
    New SubscriberDevice(testInstance)

' Set the properties that describe the subscriber device record.
testSubscriberDevice.SubscriberId = "TestUser1"
testSubscriberDevice.DeviceAddress = "stephanie@adventure-works.com"
testSubscriberDevice.DeviceName = "Work e-mail"
testSubscriberDevice.DeviceTypeName = "e-mail"
testSubscriberDevice.DeliveryChannelName = "FileChannel"

' Add the subscriber device record to the database.
testSubscriberDevice.Add()
string instanceName = "Tutorial";

// Create the NSInstance object.
NSInstance testInstance = new NSInstance(instanceName);

// Create the SubscriberDevice object.
SubscriberDevice testSubscriberDevice = 
    new SubscriberDevice(testInstance);

// Set the properties that describe the subscriber device record.
testSubscriberDevice.SubscriberId = "TestUser1";
testSubscriberDevice.DeviceAddress = "stephanie@adventure-works.com";
testSubscriberDevice.DeviceName = "Work e-mail";
testSubscriberDevice.DeviceTypeName = "e-mail";
testSubscriberDevice.DeliveryChannelName = "FileChannel";

// Add the subscriber device record to the database.
testSubscriberDevice.Add();

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

SubscriberDevice Class
SubscriberDevice Members
Microsoft.SqlServer.NotificationServices Namespace