Question :
I’m just getting into sql-server, so forgive me if this is a basic question. I’m building an application using .NET 4.0 and VS 2010 and ms-server2008.
For my application I need to detect the server response, suppose: in db-server I need to detect which table insert/update/delete records, and which is the affected record is?
Is there any mechanism or technique to detect the server response.
If have any questions please ask.
Answer :
Your options are
- to use stored procedures for data access and write log of changes,
- or to use triggers on specified tables to write log of changes
and after it you have periodically poll the log tables to reflect to the tables changes
See related answers:
https://stackoverflow.com/questions/8998545/notifications-from-sqlserver-to-java/8998579#8998579
https://stackoverflow.com/questions/8895595/sql-server-track-table-inserts/8895683#8895683