Polling Database for DataTable changes?

  • Thread starter Thread starter JP Wrye
  • Start date Start date
J

JP Wrye

Hello All,

I need to poll a database table at a specified interval, and check a
previously populated DataTable against the results. I initially thought I
could use DataTable.GetChanges() from the results of a Merge, but all rows
are of RowState.Modified.

All I want to do is poll the database for changes to a table and raise
events if data changes. Is there a way to do this?

Thanks,
JP
 
Check out Notification Services.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Like Bill mentions - you can use Notification Services in the current
version of SQL Server or in Yukon/ ADO.NET 2.0 there will be a much cleaner
way of handling this.

however, I have done this before and will warn you that this IS NOT
Something you want to do on multiple clients. If this is a service and you
are only sending notifications to one machine - you're good to do. But
you're planning on having this happen on say 20 machines - forget about it
the overhead will kill you.
 
Back
Top