Click here to Skip to main content
Sign Up to vote bad
good
Suppose there are no. of users who wants to send the reminders (Email) before two days of given date in database automatically through Database using Sql sever and asp.net.
 
Please help..
 
Suppose I have table
user_db
which contains
columns like Auto_id, user_id, email_id, Inspection_Date,IsInterested
so the Values for above Columns are
1,user1,a@yahoo.com,30-01-2013,Yes
2,user2,b@yahoo.com,01-02-2013,Yes
3,user3,c@yahoo.com,30-01-2013,Yes
4,user4,d@yahoo.com,01-01-2013,Yes
 
So if user is interested to see the details then value in "IsInterested" columns contains "Yes" then the email alerts should go before 2 days of given Inspection_Date automatically...
 

How to do it???
Please help....
Posted 28 Jan '13 - 17:41
Edited 28 Jan '13 - 18:14


3 solutions

Create an application to do the required job. And the create a schedule to run the application at required interval.
For example lets consider the scenario you mentioned above. Create an application which interacts with the database and gets the reminder time and formatted mail content. If the reminder time is less than equal to 2 days, send the mail and mark a flag in the database saying the reminder mail has been sent for this record.
Now create a schedule[^] to this this application everyday. You can decrease the time, depending on how close you want the mail to be sent based on time saved in database.
 
Also if you have a scenario where just SQL scripts can do the work, you can create SQL Jobs[^] to do the work for you.
 
Hope this helps!
  Permalink  
Hello,
 
You have to use Sql Agent Job for this purpose.
Using these you can Your logic in Stored Procedure then using sql job call it as per scheduled.
 
I also don't know more about that but i know your requirement can fulfill using this.
try to search it out.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 414
1 Arun Vasu 223
2 OriginalGriff 190
3 CPallini 163
4 Aarti Meswania 158
0 Sergey Alexandrovich Kryukov 10,169
1 OriginalGriff 7,749
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 3,089


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid