Hi all , can you pls say how i able to send the email notification alert with the datas getting from Sql server 2008 using windows service .

  • Thanks in advance

Recommended Answers

All 5 Replies

Hi all , can you pls say how i able to send the email notification alert with the datas getting from Sql server 2008 using windows service .

Thanks in advance

Connect to database.
Get dates.
Create mail.
Send mail.

Notification of what, exactly? Does the presence of records in the database trigger a notification or something else?

All of the pieces are straightforward, so break it down a bit:

  1. Connect to SQL and get data then print it out.
  2. Send a test email.
  3. Combine those by sending a "real" email with the data you got from SQL.
  4. Write a simple service that does nothing.
  5. Add a log to the service that writes a line when it polls.
  6. Combine everything by adding the "real" email notification when the service polls.

This kind of application can be written in less than an hour, especially if you use existing templates like this one.

On my windows service is working problem I am facing is after installing it the service is not running can you anyone please say why ? it happens

There are a number of reasons why a service won't start or remain started. Usually it's the result of an unhandled exception. Can you provide more detail as to what you're doing and what the result is?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.