Re: Sending a message from a trigger

From: BG (msnews.microsoft.com)
Date: 02/03/05


Date: Wed, 2 Feb 2005 21:34:35 -0500

Gabi, if you absolutely had to send the message from the SQL Server to the
client you would need to xp_cmdshell and net send a message to the user
(providing you knew where to send the message to). It would be best,
however, to utilize the client side to handle this. Have the client end
check a returned value then perform the msgbox.

"Gabi" <Gabi@discussions.microsoft.com> wrote in message
news:18E225AC-445F-4BCF-A029-026E61949320@microsoft.com...
> Hi!
> Is it possible to send a message to a user when a certain condition
> becomes
> true in a trigger on a table?
> I have a SQL Server 2000 back end and a VB6 front end and I would like the
> user to be notified (through a message box) when a field in a table has a
> specific value. Right now I have a timer that queries the table every 5
> seconds, but I would like to create a trigger instead and send a message
> to
> the user when the condition becomes true.
>
> Thank you!



Relevant Pages

  • Re: Stored procedure/trigger and scripts
    ... must have been the trigger that locked up the table. ... SQL Server has permissions to execute xp_cmdshell. ... >> client to change their password they have to call the "Client Relations" ...
    (microsoft.public.sqlserver.programming)
  • Re: Stored procedure/trigger and scripts
    ... I just ran some additional tests and it looks like my trigger is fine. ... SQL Server has permissions to execute xp_cmdshell. ... >> client to change their password they have to call the "Client Relations" ...
    (microsoft.public.sqlserver.programming)
  • Re: call to xp_cmdshell from trigger problem
    ... The application user is a SQL Server account and not a Windows user account. ... try a test and see if the client gets the required info. ... >> database and causes a trigger to fire and starts a process to notify the ...
    (microsoft.public.sqlserver.server)
  • Re: sql server events on data create
    ... If I were to do this, I would set up the client to listen on a socket, write ... an extended stored procedure that can trigger this socket, ... triggers on the tables of interest to call this extended stored procedure, ... Or you could start a custom SQL Server trace event with the right filters? ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger, alternative way to pass variable to trigger
    ... > I am using a trigger to do a transaction log - keep ... > user id but in my application I use a generic account ... > application I have user id that I can pass to SQL-SERVER ... > way to get user id if client application use the same ...
    (microsoft.public.sqlserver.programming)