Detecting Database Append from .NET Application

  • I am trying to find a best practice method to have a .NET application raise an event or detect when a table is appended. I do not seem to find too much so I must be looking for the wrong key words.

    Is there a way for a .NET application detect when data is appended or updated into a table?

    Thanks in Advance.

    Ray

  • Do you mean new data inserted into a table? There isn't really an "append" in SQL Server. You have no ideas where the rows physically live, so there isn't a concept of a start or end.

    In SQL Server 2005, there are ways to capture inserts/updates with triggers and then do something, but I'm not sure that would work with .NET.

    There are query notifications, which you might research a bit and see if that does what you are looking for.

  • Yes. I will have an external application that will pass information by writing it to a database that I will be monitoring. I want to design the application where it responds to events when data has been added. I have been looking at triggers but they cannot be used to create an external event.

    I know that there must be a simple technique for these type of situations, it is just finding the right way of posing the problem.

    Thanks

    Ray

  • Have you looked at SQL Server Notification Services ?

    Under SQL Server 2008, Notification Services is now part of Reporting Services and there is also a new feature named "Change Data Capture"

    SQL = Scarcely Qualifies as a Language

  • Yes, as a matter of fact I started this morning reading about Query Notifications services. I think that this is the answer to the problem. I am in the process of reading some articles on the subject and dive into some of the examples later on. Definitely very functional set of capabilities.

    Thanks for the help.

    Ray

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply