|
The following two triggers were used in a Web application to indicate the availability of documents related to escrow services. When a document is uploaded to the Web site, the first trigger changes a boolean field in the database to '1' to indicate that documents are uploaded. If all documents pertaining to a particular transaction are deleted from the site, the second trigger changes the boolean field value to '0' to indicate that no documents are available. |
|
|
CREATE TRIGGER dbo.AfterInsertDocAvailability ON [Atrivison].[Document]
AFTER INSERT
|
CREATE TRIGGER dbo.noDocumentsSwitch ON [Atrivison].[Document]
AFTER DELETE
|