• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Automatically send email based on criteria in SQL 2000 database

I'm trying to figure out the best way to do this. I have a Contracts Database in SQL 2000 where I have all of our contracts info of our company stored. e.g. Licensor name, Contract Type, Description, commencement date, expiration date, the path to the scanned contract  (adobe acrobat) and the email address of the person that needs to get an email when the expiration date of the contract approaches. I thought about a VB script or program that is scheduled in the "Scheduled Tasks" of Windows 2000 that runs on a daily basis that reads my contracts database and compare the expiration date to todays date and sends an alert email to the email address stored in the database. Is this the best approach? I'm not that familiar with VB. Can someone  help me with a sample VB code of doing this? Thanks a lot in advance.
Errol Farro
Errol Farro
1 Solution
you can do it from sql server it self
schedule new job run TSQL to get the contracts and use sp_mail to send the mail...
Errol FarroAuthor Commented:

Thanks for your quick response but can you be a little more specific? Where on the SQL Server can I schedule a job run TSQL. What is TSQL? How and where can I use sp_mail to send the mail afterwards. Thanks. Errol.
To be honest, if you don't know what TSQL is and you don't know VB then you need to hire someone that can do this for you.  Since you are dealing with documents that are most likely sensitive if not legally privilidged it would suck to have something be done wrong because a novice is doing it.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now