Better approach or alternative to SqlDependency

Posted on 2009-04-22
Medium Priority
Last Modified: 2012-05-06
I used this tutorial to setup database syncing:


Basically the way it works is bind a notification to a query, run the query. Then when a change is made, the SQLDependency is disposed of, a new SQLDependency is created (apparently because a notification expires after one trigger is sent), then the query has to rerun.

This seems rather inefficient because if you have a 100,000 rows, and one row is changed, then you end up receiving all 100,000 rows again, rather than the one row that changed. Furthermore, to change data displayed (unless you want to rebuild the list view which doesn't look clean) you need to walk through your new data to find the differences and update them manually. I am setting up an updated datetime column so that I could walk through the new table quicker and skip rows with old timestamps. Still not ideal...

There must be a better way to go about this, right?
Question by:dcollins2010
1 Comment
LVL 46

Accepted Solution

tbsgadi earned 2000 total points
ID: 24212425
Hi dcollins2010,

Have a look at the following:

Good Luck!


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question