sqldependency

Using SqlDependency with named Queues

别说谁变了你拦得住时间么 提交于 2021-02-18 10:41:13
问题 I have the following code that uses SqlDependency to monitor changes in one of my databases It works great, except every run it generates its own Queue/Service/Route with a guid in the database: Class: class SqlWatcher { private string connectionString; private string sqlQueue; private string listenerQuery; private SqlDependency dependency; public SqlWatcher(string connectionString, string sqlQueue, string listenerQuery) { this.connectionString = connectionString; this.sqlQueue = sqlQueue;

Using SqlDependency with named Queues

我只是一个虾纸丫 提交于 2021-02-18 10:41:10
问题 I have the following code that uses SqlDependency to monitor changes in one of my databases It works great, except every run it generates its own Queue/Service/Route with a guid in the database: Class: class SqlWatcher { private string connectionString; private string sqlQueue; private string listenerQuery; private SqlDependency dependency; public SqlWatcher(string connectionString, string sqlQueue, string listenerQuery) { this.connectionString = connectionString; this.sqlQueue = sqlQueue;

SQLDependency Caching not working

筅森魡賤 提交于 2020-01-11 11:29:50
问题 I am trying to use SQLDependency Caching with Query Notifications in my ASP.NET application. I followed these steps to set up SQLDependency Caching.I was able to set up the db successfully. However,when I run my application I am getting the following error. Cannot find the specified user 'owner'. Cannot find the queue SqlQueryNotificationService-6c3ae823-a678-4ed2-8b97-561b5f2561ee', because it does not exist or you do not have permission. Invalid object name SqlQueryNotificationService

SqlDependency Reliablity?

喜夏-厌秋 提交于 2020-01-10 06:44:08
问题 My current situation is that I have an application that needs to be notified when new data arrives in a database table. The data is coming from an external source (that I have no control over--this is this only integration option). When new data arrives, my application needs to take certain actions--basically query for the new data, handle it, insert the result into a local table, etc. I want to avoid polling if possible, as the data is expected to be handled in real time. That said, making

Why am I getting an 'open data reader' exception with my SqlDependency subscription?

倾然丶 夕夏残阳落幕 提交于 2020-01-06 14:15:59
问题 I have finally, with an aggregate of an amazingly high numbers of dysfunctional examples, managed to receive change messages on a SqlDependency object. This knowledge may prepare you for the inelegance or plain incorrectness of my code. I have an ActiveList<T>: ObservableCollection<T> class that listens for changes to it's DB table data source and repopulates itself. I use the following code to create and initialize the list and the SqlDependency : Constructor: public ActiveList() {

Design consideration for data retrieval : pooling vs SqlDependency and SqlCacheDependency

爱⌒轻易说出口 提交于 2020-01-06 04:05:14
问题 I am little confused in one of the design consideration. Following are my requirements: My web-application need to retrieve real time data through database. Every update in the data should be reflected back to user. A session can last for couple of hours Every user will have their personal data in the report (eg select * from user where User = ‘A1’;) There can be around 300-400 users at a time Data retrieval mechanism should be outside the main application (eg. Web services) Database is

Stopping SqlDependency gracefully

最后都变了- 提交于 2020-01-03 02:49:09
问题 I have an application that utilizes SqlDependency objects to track changes on certain tables of data in an underlying database. For the most part they work well, however, I noticed when I try to kill the dependency using the static Stop() method of the class, I get the following exception: A severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user. That's about all the information the runtime provides. On the databases end the log is