Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trigger email when a date in a field is older than a day

Status
Not open for further replies.

meltingpot

Technical User
May 11, 2004
118
GB
How do I trigger an email to a user, users, when a field in a database has an entry older than a day compared with Date()

Any Ideas ?

MS Access using ASP/VBscript IIS 6, Exchange server
 
this would be best ran from your sql server (if you are running a sql server)

if you're thinking of trigger to 'trigger' the action then this would not work, as you need something to happen to the record to trigger it.... (thats the word trigger over used)

your best bet is to create a stored procedure to check, send and mark

i'd probably add a field to the db, either a bit field for marking or a date field to record the send date!!!

select all records to send where the datediff is greater than you specify and the emailsent is null / 0

loops are not good for stored procs but not sure how you'd send a mail otherwise but its something to consider...

then run your sproc on a timer under jobs, set to run however often you want it...

you will need smtp sendmail set to run on your sql server, i ran into this problem before

off the top of my head i can't remember the coding, but its something to possible search on

i'll try and look up some of the job sprocs i've done...

daveJam

even my shrink says its all your f#@/ing fault
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top