Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI'm trying to e-mail the results of a trigger that fires on an employee table. I'm trying to included the results of either the DELETED or INSERTED tables, but nothing is returned. Can xp_sendmail include DELETED or INSERTE D table queries in the @query = parameter? I'm trying to send an e-mail to someone whenever a new employee is added or deleted. Thanks.
Post Follow-up to this messageRegardless that doesn´t work because the new session with XP_sendmail won´ t know about your deleted tables, the action you want to perform is not preferable, because mail sending will be done synchronisly. So if your mailserver is stuck in a problem and need 5 minutes for sending a mail (for some reason) your transaction will hold on for that time, if the process throws an error, your transaction might rollback. You don´t want that, erh ? I would suggest (as this is not time critical) to write the data in a table which is regulary checked for content to be sent. -- HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- "Shawn Barrow" wrote: > I'm trying to e-mail the results of a trigger that fires on an employee > table. I'm trying to included the results of either the DELETED or INSERT ED > tables, but nothing is returned. Can xp_sendmail include DELETED or INSER TED > table queries in the @query = parameter? > > I'm trying to send an e-mail to someone whenever a new employee is added o r > deleted. > > Thanks.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread