Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 18:41pm
Edited 28-Jan-13 19:14pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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  
v2

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

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100