User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,944 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,882 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 3138 | Replies: 4
Reply
Join Date: Aug 2005
Posts: 26
Reputation: aish is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
aish's Avatar
aish aish is offline Offline
Light Poster

database reminders

  #1  
Aug 29th, 2005
Hi,
I have a database table which has a Field called birthday.I want to write SQL script which automatically search database every day and if someones birthday equal today then display a reminder(alert).how can I do this? can anyone help me?

Thanks,
aish. :o
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Modesto, CA
Posts: 15
Reputation: Elohir is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Elohir's Avatar
Elohir Elohir is offline Offline
Newbie Poster

Help Re: database reminders

  #2  
Sep 6th, 2005
Hi Aish,

There are several questions you would need to consider and answer before anyone can really help you get going in the right direction....

1) How do you want to be notified... e-mail? pop-up window? Text mail to your phone?

2) How do you want this triggered? In other words, Do you want the date check to run at 12AM every day? Or would you rather it only run when you log on to your workstation?

3) What machine is going to trigger it... the SQL server or your workstation? (Or do you have only one machine that is always on?) If you run it on the server, what do you want it to do with your notification if your workstation is not online (not an issue if you are emailing the notice)?

There are two sides of this see-saw:

If you run it on the server, triggering the event is easy, but sending the notice out gets a bit more complicated, whether using SQLMail or coding your own CDO or CDONTS (or other object) script .....

If you run it on your local workstation, especially in your login or startup script, then triggering the check and posting the notice is very easy, but getting the information from the database becomes the more difficult part requiring ODBC connections and some local scripting.

The prefered method would be to have the server trigger it at a specified time each day, and send an email to a email address that you can change as necessary.

If you can answer the above questions, I'll see how much more I can help.

:mrgreen:

Elohir
Reply With Quote  
Join Date: Nov 2005
Location: India
Posts: 1
Reputation: rishit is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rishit's Avatar
rishit rishit is offline Offline
Newbie Poster

Re: database reminders

  #3  
Nov 16th, 2005
Hi,
I have a database table which has a Field called birthday.I want to write JSP using My SQL which automatically search database every day and if someones birthday equal today then display a reminder(alert).how can I do this? can anyone help me?

Thanks,
rishit
Reply With Quote  
Join Date: Aug 2005
Posts: 26
Reputation: aish is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
aish's Avatar
aish aish is offline Offline
Light Poster

Re: database reminders

  #4  
Nov 19th, 2005
Ok Elohir, these are my answers,

1) How do you want to be notified... e-mail? pop-up window? Text mail to your phone?
I woluld like to send email

2) How do you want this triggered? In other words, Do you want the date check to run at 12AM every day? Or would you rather it only run when you log on to your workstation?
I want to date check to run at 12AM every day if I log or not

3) What machine is going to trigger it... the SQL server or your workstation? (Or do you have only one machine that is always on?) If you run it on the server, what do you want it to do with your notification if your workstation is not online (not an issue if you are emailing the notice)?
My project is webbased project I use web server and the sql server
Reply With Quote  
Join Date: Oct 2005
Location: Manchester, UK
Posts: 481
Reputation: pty is on a distinguished road 
Rep Power: 3
Solved Threads: 31
pty's Avatar
pty pty is offline Offline
Posting Pro in Training

Re: database reminders

  #5  
Nov 20th, 2005
Originally Posted by aish
Ok Elohir, these are my answers,

1) How do you want to be notified... e-mail? pop-up window? Text mail to your phone?
I woluld like to send email

2) How do you want this triggered? In other words, Do you want the date check to run at 12AM every day? Or would you rather it only run when you log on to your workstation?
I want to date check to run at 12AM every day if I log or not

3) What machine is going to trigger it... the SQL server or your workstation? (Or do you have only one machine that is always on?) If you run it on the server, what do you want it to do with your notification if your workstation is not online (not an issue if you are emailing the notice)?
My project is webbased project I use web server and the sql server


i think the best way to tackle this is to make a stored proc that does the check and put the details of the birthday people in a temp table, once you've got them all use xp_sendmail to send the email.

then in enterprise manager find 'jobs' (in management|sql server agent) and make a job that is run once per night and have it execute your stored proc

you could do this by just puttin the body of your stored proc in the job but its neater to do it that way
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 8:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC