[Top] [All Lists]

Re: Custom Formatter: Initialize and Close methods

Subject: Re: Custom Formatter: Initialize and Close methods
From: Joe Webb
Date: Tue, 12 Jul 2005 07:53:14 -0500
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Forgot to include the getNSInstance proc in the prior. Nothing
special, just wanted to be complete.

private NSInstance getNSInstance()
        //Create an NSInstance object
        string instanceName =           
        NSInstance instance;
        instance = new NSInstance(instanceName);
        return instance;



Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS 

I support PASS, the Professional Association for SQL Server.

On Tue, 12 Jul 2005 07:46:11 -0500, Joe Webb
<[email protected]> wrote:

>Here's some C# code that can be used to delete all subscriptions for a
>particular subscriber. You could put this in a loop of all subscribers
>to completely get rid of your subscriptions. (You'll also want to put
>this is a try block with proper error handling).
>public bool DeleteSubscriptions(string sId)
>       //Create an NSInstance and NSApplication object
>       NSInstance instance = getNSInstance();
>       //create a subscriber object
>       Subscriber subscriber = new Subscriber(instance);
>       subscriber.SubscriberId = sId; 
>       //delete the subscriptions
>       subscriber.DeleteSubscriptions() ;
>       return true;
>If you have multiple applications for the instance, you can specify in
>which application the subscriptions should be deleted. 

<Prev in Thread] Current Thread [Next in Thread>