Whenever a record is inserted or updated in a sql server table, I have to call a third party service which will insert/update their table. What is the most efficient way to do this?
SQL server trigger to .Net call (I'm not sure if this is possible... Is it possible to send the id of the record to a .Net application whenever insert/update occurs?)
An application which checks continuously for changes in the table using a select statement, get the particular record -> send through service.
Something else?
In SQL Server 2005 and above, you have the ability to create CLR Stored Procedures, which are stored procedures that run standard .Net code, as opposed to SQL related code. There are some limitations to what it can do, but you could easily create an insert trigger that passes the @@IDENTITY of the new record added to a CLR stored procedure that does the .Net processing you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With