Subscriber.Delete Method
Notification Services データベースからサブスクライバ レコードを削除します。
名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)
構文
'宣言
Public Sub Delete
public void Delete ()
public:
virtual void Delete () sealed
public final void Delete ()
public final function Delete ()
解説
Delete メソッドは、サブスクライバ、およびそのサブスクライバに関連付けられているすべてのサブスクリプションとサブスクライバ デバイスを削除します。
サブスクライバ レコードを削除するには、レコードを有効にする必要があります。
サブスクライバ ID を設定すると、その後の削除処理はすべて、最初に取得したレコードではなく、設定したサブスクライバ ID に対応するレコードに対して行われます。
使用例
Delete メソッドを使用してサブスクライバを削除する例を次に示します。
Dim instanceName As String = "Tutorial"
' Create the NSInstance object.
Dim testInstance As NSInstance = New NSInstance(instanceName)
' Create the Subscriber object.
Dim testSubscriber As Subscriber = New Subscriber(testInstance)
' Set the subscriber ID so that the correct
' subscriber record is updated.
testSubscriber.SubscriberId = "TestUser1"
' Change subscriber data, then update the database.
testSubscriber.Delete()
string instanceName = "Tutorial";
// Create the NSInstance object.
NSInstance testInstance = new NSInstance(instanceName);
// Create the Subscriber object.
Subscriber testSubscriber = new Subscriber(testInstance);
// Set the subscriber ID so that the correct
// subscriber record is updated.
testSubscriber.SubscriberId = "TestUser1";
// Change subscriber data, then update the database.
testSubscriber.Delete();
スレッド セーフ
この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
Subscriber Class
Subscriber Members
Microsoft.SqlServer.NotificationServices Namespace