Event handling

M

Marek Samaj

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
 
M

Mary Chipman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top