Hi.

I wrote simple C# app, that connects to SQL Server 2000 DB using ADO.NET.

I want to monitor inserts to specified table from my app. That is, when
someone inserts a row [or entire rowset] to this table, i want to catch this
"event" and handle it [rather, i want to get the inserted data]. In old C,
this was done with extended stored procedures and system events. Is there
any easier way to do this in C# and ADO.NET?

Thanks for answer.

Regards
Marek Samaj

Re: Event handling by Mary

Mary
Fri Dec 05 14:59:29 CST 2003

I'd implement this on the server side using triggers or stored
procedures for inserts that take care of the logging for you.
Personally, I prefer the stored procedure approach where you could
wrap the insert to the base table and the logging operation in a
single explicit transaction. All you'd use C# for would be any
exception handling if the operation failed.

-- Mary
MCW Technologies
http://www.mcwtech.com

On Fri, 5 Dec 2003 16:46:11 +0100, "Marek Samaj" <marky_s@stonline.sk>
wrote:

>Hi.
>
>I wrote simple C# app, that connects to SQL Server 2000 DB using ADO.NET.
>
>I want to monitor inserts to specified table from my app. That is, when
>someone inserts a row [or entire rowset] to this table, i want to catch this
>"event" and handle it [rather, i want to get the inserted data]. In old C,
>this was done with extended stored procedures and system events. Is there
>any easier way to do this in C# and ADO.NET?
>
>Thanks for answer.
>
>Regards
>Marek Samaj
>