Automatically send email based on criteria in SQL 2000 database

Posted on 2005-03-05
Medium Priority
Last Modified: 2010-08-05
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.
Question by:Errol Farro
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

ITBG earned 750 total points
ID: 13466094
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...

Author Comment

by:Errol Farro
ID: 13466124

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.

Expert Comment

ID: 13468913
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question