Stored Procedures for Overdue Notice Delivery
The CML's system of overdue notice delivery requires two stored procedures. They are:
- fm_admin_overdue_notices. This stored procedure queries the FmLib database. First it searches the borrower table for items whose due date has passed. It then builds a table of their borrowers and calls the stored procedure fm_admin_send_notice, passing it the information about those borrowers and the specific items they've had checked out too long.
- fm_admin_send_notice. This stored procedure is called from fm_admin_overdue_notices. It uses the borrower (borrower#) and title information (bib#) passed to it to generate and address the message it will send to holders of overdue items. It then calls the extended stored procedure xp_sendmail to actually send the message.