Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Using Microsoft Notification Services using MS Sql Server 2005 (Part1)

Author: Zunnair

In this article I will Explain regarding Microsoft Sql Server Notification Services this article consists of two parts, this is (part 1 ) of this article.

Microsoft SQL Server Notification Services is a platform for developing and deploying applications that generate and send notifications to subscribers. The notifications generated are personalized, timely messages that can be sent to a wide range of devices, and that reflect the preferences of the subscriber.

Subscribers create subscriptions to notification applications. A subscription is an expressed interest in a specific type of event.

A notification can be generated and sent to the subscriber as soon as a triggering event occurs. A notification can also be generated and sent on a predetermined schedule specified by the subscriber.

Notifications can be sent to a wide range of devices. For example, a notification can be sent to a subscriber's cellular phone, personal digital assistant (PDA), Microsoft Windows Messenger, or e-mail account. Because these devices often accompany the subscriber, notifications are ideal for sending important information.

'

' SQL Server Notification Services sample

'

' AddSubscriptions.vbs

'

' Add a set of subscriptions to the Weather application

'

AddSubscriptions

 

 

Function AddSubscriptions()

      Dim nsInstance, nsApplication, nsSubscription

 

      ' Create NSInstance object

      Set nsInstance = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.NSInstance")

      nsInstance.Initialize "SalNFS"

     

      ' Create NSApplication object       

      Set nsApplication = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.NSApplication")

      nsApplication.Initialize (nsInstance), "SalAPP"

 

      ' Create NSSubscription object

      Set nsSubscription = WScript.CreateObject("Microsoft.SqlServer.NotificationServices.Subscription")

      nsSubscription.Initialize (nsApplication), "SalNFSSub"

     

      ' Set common properties for all subscribers

      nsSubscription.SetFieldValue "DeviceName", "myDevice"

      nsSubscription.SetFieldValue "SubscriberLocale", "en-us"

 

      ' Add subscriptions

      nsSubscription.SubscriberId = "Sal"

      nsSubscription.SetFieldValue "City", "Lahore"

      nsSubscription.Add

 

      wscript.echo "Subscriptions successfully added."

End Function

 

Notification applications are valuable for many reasons, including the following:

·                      Notification applications enable you to send critical information to customers, partners, and employees. The notifications can contain links to a Web site to retrieve more information or to acknowledge receipt of the information.

·                      Notification applications enhance and strengthen your relationships with customers by providing more customized and timely services to them.

·                      Notification applications help increase your revenue by making it easier for customers to initiate business transactions with you.

·                      Notification applications help make your employees more productive by providing them with the information they need, whenever and wherever they need it.

·                      Notification applications allow you to communicate with mobile subscribers over a wide variety of devices.

 

So, simply create an application for gathering the required information from a subscriber, and use the classes provided in the Microsoft.SqlServer.NotificationServices namespace.

This is part 1 of "Using Microsoft Notification Services using MS Sql Server 2005" I hope you will understand easily. I will explain it further in my part 2.

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How we can develop database paging using PLSQL in Sql Server 2005

Disclaimer - Privacy
© 2002-2017 DevASP.net