Questions tagged [sqldependency]

The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.

The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.

MSDN Documentation

454 questions
6
votes
1 answer

How to use SqlDependency with STRING parameter

I am trying to detect if any changes been made to SQL table I'm working with. I need to specify the search by selecting specific records only, and for this reason I need to use string parameter. I understand that according to this MSDN document: …
jaspernorth
  • 415
  • 1
  • 10
  • 28
6
votes
1 answer

SqlDependency OnChange Not Firing

This is the first time I've ever needed to use an SqlDependency so I am hoping that its a stupid mistake I've made. The problem I'm having is that the OnChanged event doesn't fire when the sql table changes. No errors or anything just it doesn't…
Nick Williams
  • 1,237
  • 6
  • 19
  • 40
5
votes
2 answers

Monitor data changes in SQL Azure

Is there a way to to get notifications when SQL Azure data changes or when new data is inserted? I would like to send notifications to an ASP.NET web application and push notifications to a Windows Phone. I know that the SqlDependency class and…
5
votes
0 answers

How to use SqlDependency in ASP.NET Core 3?

I am building a web app that has a dashboard page in which data must be updated in real-time. I'm using ASP.NET Core 3.0, MVC, ADO.NET, SignalR, and SqlDependency in my project. I chose SignalR and SqlDepdendency (first time i'm developing with…
Dan Wind
  • 71
  • 1
  • 5
5
votes
1 answer

Caching with SqlDependency

I'm using SqlDependency to monitor for changes in a database. Let's say, these are stock quotes, to make the example easy to understand. The application also uses (another) SqlDependeny-Object to monitor changes to static data, which is cached in…
Gregor Favre
  • 155
  • 1
  • 10
5
votes
2 answers

Why SignalR change function hitting many many times?

I try to develop an asp.net mvc application and also trying to use signalr. The problem is that i have two tables that control user notificitaions in project. I have a Notification table and also NotificationUser table which is many to many table of…
mr.
  • 679
  • 12
  • 30
5
votes
2 answers

Why is my SqlDependency not firing

I have a database running on MS SQL Server 2005 and an ASP.NET 3.5 web application. The database contains a product catalog which I'm using to feed "pages" into a CMS running in the web app. Once the pages have been created the application caches…
Greg B
  • 14,597
  • 18
  • 87
  • 141
5
votes
1 answer

How to use SqlDependency and SignalR with 2 different databases using one function in C#?

I have the scenario to use 2 different SqlDependencies with 2 different databases connection, but call in one function. I want to get updates by 1st DB using SqlDependency, then sync the 2nd DB on 1st DB changes, so then on 2nd DB updates I want to…
adnan
  • 1,429
  • 1
  • 16
  • 26
5
votes
2 answers

Can I use SqlDependency with multiple listeners / load balance

I am currently using a SqlDependency with a SQL Server 2012 Service Broker and I want to be able to have two servers configured both listening to the service broker and pull off the queue but message should only be pulled off the queue once total.…
Smeiff
  • 259
  • 1
  • 6
  • 17
5
votes
1 answer

Detect SQL database changes

Consider this example: INSERT INTO [Table] (column1) SELECT value1 If I were to execute this command in SSMS, in regards to a c# forms application, what would I need to do in order to recognize this event? Something as simple as the application…
Volearix
  • 1,573
  • 3
  • 23
  • 49
5
votes
1 answer

How to catch that a trigger has been fired on sql server

I have a table on SQL and when there is an insert to this table I want to print this inserted data. What I am thinking in: Create a trigger on that table. Handle the printing event on c# after the trigger works. My problem I don't know what is the…
RE RE RE RE
  • 209
  • 2
  • 6
5
votes
0 answers

SQLNotificationRequest Application Example or Tutorial

After using SQLDepdendency as a queue implementation in one of my projects (now live) and after discovering that it is ineherinitley broken (see http://rusanu.com/2008/01/04/sqldependencyonchange-callback-timing/). I am desperately looking for…
gorillapower
  • 450
  • 6
  • 15
5
votes
3 answers

Service Broker messages start to get hung up after about a day

I have an application that is using the Service Broker is SQL 2008. About once a day the database's performance starts take a noticeable hit and I have determined that this is because of the Service Broker. If I hard reset all broker connections…
lehn0058
  • 19,977
  • 15
  • 69
  • 109
4
votes
2 answers

Using SignalR with SqlDependency to push database updates

Is is possible to use SignalR in combination with SqlCacheDependency (or SqlDependency) to push database updates directly to the browser ? Maybe there is an other way to achieve this functionality ? The only thing i can get working now includes…
Willem D'Haeseleer
  • 19,661
  • 9
  • 66
  • 99
4
votes
1 answer

SQL Dependency in C#

I'm trying to figure out how to use SQL Dependency (C# 4.0) to 'listen' for changes to a database. I've seen quite a few things on the web, but they seem to be tailored (naturally) for using the dependency to pull the same data that the SQL…
keynesiancross
  • 3,441
  • 15
  • 47
  • 87
1 2
3
30 31