Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 send data to port from MS sql server trigger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-18 : 22:12:13
Plash writes "Hi

When an SQL server table is being updated , I have put in insert / update trigger to check if value of column2 = 9
if so I want to send this data of col1, col2 , and col3 to a UDP port so I can recieve it via another program listening to that port on the lan.

FOR EXAMPLE
___________________________________________________
CREATE TRIGGER emp_triggerA ON [emp]
FOR UPDATE
AS

declare @empID as char(10)
declare @empName as char(10)

select @empid = inserted.empID from inserted
select @empName = inserted.empName from inserted

insert emp_updateInfo (empID , empName , iData)
Values (@empID , @empName , getDate() )
_____________________________________________________

INSTEAD Of the insert into statement I want to run a cmdShell or EXEC ute an xp_ which will send the data to a UDP port on my lan.


Please let me know how to do this,
pls send me mail when you do this, the email is valid.


CURRENTLY to run on SQL 7, NT4 latestSP
We can run it on SQL2000 SP1 , Win2000 SP2 if it would work on that config.

TIA
Regards

Plash"
   

- Advertisement -