
NT/2k Services/MAPI/Outlook/SQL Design Issues
Robert,
The functionality you describe is already available through the SQL Server
Agent. In Enterprise Manager, look under Management | SQL Server Agent. You
can create and schedule jobs and set up alerts for email notification by
clicking your way through the dialogs.
All you need to do is write a stored procedure for your query. When your
certain condition is met, you can raise an error with a specific number that
you have defined ahead of time and for which you have created an alert.
Alternately, if you don't want to use alerts, you can just execute
xp_sendmail in the stored procedure.
Linda
Hello NGs,
Would contributors pls give me the benefit of their experience, on the best
way to approach this problem. Specifically, I'm looking at the drawbacks
&/or advantages of different software components that might be incorporated
to solve this problem:
We have an SQL Server database. I want to construct an "always-on"
notification service. Basically, every 15 mins or so, the service will query
the database, and if certain conditions are met, will then send a
notification to a specified end user. The notification will take the form of
an email, which will be sent via our Exchange server.
Questions:
1. My initial thought was to build an NT/2000 service. I would have to do
this with VB, but MS obviously caution against using VB apps as services.
(srvany & all that.) Can I create an NT service with VC++? I'm not great
with VC yet, but I'm learning .....
2. According to MS documentation, I can't use the Outlook library if I want
to implement an NT service -- because you cannot always suppress Outlook
dialog boxes, which is a No-No for a service. Is there an alternative
"silent" library that I can leverage to send messages via Exchange?
3. Do you think I will have to "fudge" it -- and just write a VB Executable,
& then schedule it to run every 15 minutes, or something?? I reckon a
genuine "service" would be better - but not if means loads of extra
development time.
If anybody has some experience with this type of solution pls fill me in --
I want to make sure I get a good plan laid out, that _will_ work, before I
try to build something.
TIA
Robert.