I need to show changes to data in a database through SqlDependency
and SignalR. Suppose my transaction table is often changed by many people. Suppose in a few seconds, the data is changed many times, then I would like to know how notifications will go to the SqlDependency
class ?
Will change data be queued before SqlDependency
class?
Can the SqlDependency
class handle data change when huge number of traffic will do the changes?
I read this article on SqlDependency
& SignalR.
A few things were not clear to me.
How to give subscribe query notification permission to IIS?
Please see the line in this article.
private void dependency_OnChange(object sender, SqlNotificationEventArgs e) { JobHub.Show(); }
When data is changed, then the dependency_OnChange
event will fire and JobHub.Show();
is called.
JobHub
is the name of a class (not a static class), so I'd like to know how to call JobHub.Show();
from outside?
- What is the
GlobalHost
class and when it is used? - The article code related issue. Just go to this link.
See the jQuery code in the view that fetches data and populates a table. The first time when the page loads, suppose there are 5 records existing in the table, so 5 records will be passed to the jQuery code and it will just display those 5 records. But when any existing data will be changed in the table, then what will happen?
Will only the changed rows come to client side, or will all data including the changed data come to client side?
If you say only the changed data will, code then just see the video in that link. It is shown in the video data is changed one by one and change is reflecting at client end, but if you see the jQuery code it just empties the table first and builds the table again.
So my question is, if the data is changed and only changed data will come, then one row should display at client side.... am I right? But in video the change is showing other data as well.
So please read the link article once and then answer my question. Thanks.