Subscription Constructor ()
Creates an uninitialized instance of the Subscription class.
Namespace: Microsoft.SqlServer.NotificationServices
Assembly: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)
Syntax
'Declaration
Public Sub New
public Subscription ()
public:
Subscription ()
public Subscription ()
public function Subscription ()
Remarks
The parameterless constructor is used in conjunction with the Initialize method to enable COM interoperability. After construction, the resulting object must be initialized with a reference to an NSApplication object and a subscription class name before it can be used.
Example
The following example shows how to create and initialize a Subscription object in unmanaged Microsoft Visual Basic Scripting Edition (VBScript) code:
Dim testInstance, testApplication, testSubscription, subscriptionId
const instanceName = "Tutorial"
const applicationName = "Weather"
const subscriptionClassName = "WeatherCity"
' Create the NSInstance object.
set testInstance = WScript.CreateObject( _
"Microsoft.SqlServer.NotificationServices.NSInstance")
testInstance.Initialize instanceName
' Create the NSApplication object.
set testApplication = WScript.CreateObject( _
"Microsoft.SqlServer.NotificationServices.NSApplication")
testApplication.Initialize (testInstance), applicationName
' Create the Subscription object.
set testSubscription = WScript.CreateObject( _
"Microsoft.SqlServer.NotificationServices.Subscription")
testSubscription.Initialize (testApplication), subscriptionClassName
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
Subscription Class
Subscription Members
Microsoft.SqlServer.NotificationServices Namespace