Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is user defined messages possible in MS SQL?

Status
Not open for further replies.

ertug

Programmer
Sep 18, 2000
3
TR
Hi,

Is it possible to define a message in a trigger and broadcast to the system? This will be useful to understand when a record is updated/inserted to a table without checking the table with a timer by an application.

Thanks. [sig][/sig]
 
You can use sp_addmessage to create the message and then refer to the message in the trigger just as if it had been a system error number.

Good Luck! [sig][/sig]
 
Thank you, I will try that. [sig][/sig]
 
Ertug, you mentioned that you wanted a &quot;broadcast to the system&quot;; not knowing for sure what you mean, you might also consider using xp_sendmail to send an e-mail message when a row is inserted, if that suits your needs. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top