次の方法で共有


Subscriber.DeleteSubscriptions Method ()

Notification Services インスタンスによってホストされるすべてのアプリケーションから、サブスクライバのサブスクリプションをすべて削除します。

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

構文

'宣言
<ComVisibleAttribute(False)> _
Public Sub DeleteSubscriptions
[ComVisibleAttribute(false)] 
public void DeleteSubscriptions ()
[ComVisibleAttribute(false)] 
public:
void DeleteSubscriptions ()
/** @attribute ComVisibleAttribute(false) */ 
public void DeleteSubscriptions ()
ComVisibleAttribute(false) 
public function DeleteSubscriptions ()

使用例

DeleteSubscriptions メソッドを使用してサブスクライバのすべてのサブスクリプションを削除する例を次に示します。

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.DeleteSubscriptions()
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.DeleteSubscriptions();

スレッド セーフ

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

プラットフォーム

開発プラットフォーム

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

対象プラットフォーム

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

参照

関連項目

Subscriber Class
Subscriber Members
Microsoft.SqlServer.NotificationServices Namespace