c# and ms sql triggers

  • Thread starter Thread starter Artur Mucha - 96 Volt
  • Start date Start date
A

Artur Mucha - 96 Volt

Hello,

does anyone know if it is possible to react on ms sql triggers in c# and how
to do it ???

AM.
 
Thanks for the plug and for completeness, I should note that this will all
change in Yukon - you will be able to write this natively in managed code
but of course we can't talk about.

--
--------------------------------------------------------------
Sam Gentile [C#/.NET MVP]
..NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------
Sami Vaaraniemi said:
An MS SQL trigger can call COM components. So basically you could write a C#
class and expose it as a COM component and call it from the trigger. For
more details on how to expose a C# class as a COM component, see Sam
Gentile's article on MSDN:
http://msdn.microsoft.com/netframew...brary/en-us/dndotnet/html/useframewktools.asp .
 
An MS SQL trigger can call COM components. So basically you could write a C#
class and expose it as a COM component and call it from the trigger. For
more details on how to expose a C# class as a COM component, see Sam
Gentile's article on MSDN:
http://msdn.microsoft.com/netframew...brary/en-us/dndotnet/html/useframewktools.asp .

However, calling a COM component from a trigger does not give you great
performance, and usually you want to do whatever it is you are doing in the
trigger as quickly as possible. Writing an extended stored procedure e.g.,
in unmanaged C++ would result in much better performance.

Sami
www.capehill.net
 
Back
Top