Q: Check if data is changed in a SQL Table

  • Thread starter Thread starter Martin Arvidsson, Visual Systems AB
  • Start date Start date
M

Martin Arvidsson, Visual Systems AB

Hi!

Sorry if I am posting this in the wrong NG.

What I want to do is to create a .NET dll that alerts my program when an
update has been commited to a specific table in my SQL Database.

Is it possible? Any directions on what to google on, links etc?

Any help would be most kindly...
 
Martin,

I haven't worked on this.
However, SQLDependency is something that was introduced to achieve
this & it works with sql 2005.

HTH
Kalpesh
 
Hi!

Sorry if I am posting this in the wrong NG.

What I want to do is to create a .NET dll that alerts my program when an
update has been commited to a specific table in my SQL Database.

Is it possible? Any directions on what to google on, links etc?

Any help would be most kindly...

Apart of SQLDependency as Kalpesh mention I do not know of any other
way. You can always poll it.
We have a software that does something like that. When new data
becomes available it update a counter in a system table, and there is
a service process that holds a reference to the last checked value, if
the value in the DB is bigger, then it goes and refresh the data.
In another escenario there is a table that holds jobs references, and
there are several processes (again windows services) that are the
executers, in this case each row has a flag to indicate if the process
is being (or was) ran. and again a poll mechanism is used.
 
Martin said:
Sorry if I am posting this in the wrong NG.

What I want to do is to create a .NET dll that alerts my program when an
update has been commited to a specific table in my SQL Database.

Is it possible? Any directions on what to google on, links etc?

The best would probably be if the app updating the database
or some middleware used to do it also notified your app (actually
all subscribers).

The second best would be to have the database push a notification
out to you. As already posted then SQLServer 2005 and .NET 2.0 makes
that relative easy.

The worst solution is polling.

Arne
 

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

Back
Top