FAQ Database Discussion Community


Notify winforms application by Sql Server database changes

c#,.net,sql-server,winforms,sqldependency
I created a Sql server database, in which I added a table named user. Then I executed this script ALTER DATABASE [TestNotification] SET ENABLE_BROKER I'd like to use SqlDependency class to notify a winforms application when the user table were changed. namespace Watcher { public partial class Form1 : Form...

SqlDependency is working with one but not with other table

c#,sql-server,database-connection,sqldependency
I have written this class to automate SQLDependencys public class DatabaseChangeAlert { private String connectionString; private SqlConnection sc; public event EventHandler<DatabaseChangedEvent> DatabaseChangeEvent; private String tabelle; private String query; public DatabaseChangeAlert(String tabelle, String conString) { try { this.tabelle = tabelle; this.sc = new SqlConnection(conString); ;//new SqlConnection(GlobalResources.ConnectionString); this.connectionString = conString; String sel...

SignalR and SqlDependency refreshment issue - ASP.NET

asp.net,webforms,signalr,sqldependency
I have a table in MSSQL database, and I have an ASPX page, I need to push all new rows to the page in a descending order. I found this awesome tutorial which is using SignalR and SqlDependency and it shows only the last row descarding the previous rows which...

SignalR MVC4 Issue

javascript,asp.net-mvc-4,signalr,signalr-hub,sqldependency
I am following this tutorial to integrate SignalR to my project http://venkatbaggu.com/signalr-database-update-notifications-asp-net-mvc-usiing-sql-dependency/ So basically this is my View where I want to show my table. @{ ViewBag.Title = "PatientInfo"; } <h2>PatientInfo</h2> <h3>@ViewBag.pName</h3> <h5>@ViewBag.glucoseT</h5> @if (Session["LogedUserFirstname"] != null) { <text> <p>Welcome @Session["LogedUserFirstname"].ToString()</p> </text> @Html.ActionLink("Log Out", "Logout",...

Alternative for sqldependency

c#,signalr,sqldependency
I have a mssql table that holds chat information. It has computed columns, has millions of rows and is being used/populated by an third party application. Now I want to use this table to show chat history on my website and possible in future have the ability to send messages...

SqlDependancy is firing more times

sql,asp.net,signalr,sqldependency
Hi i am trying to implement sqldependancy with signalr for new database changes. but the problem is if i edit only one row then also sqldependancy is firing more time. and some time it is not firing. I have web application without MVC. bellow is my code public void page_load(object...

sql dependency Invalid object name '

c#,.net,sqldependency
I am trying to use sql dependence, and I tried with making the connection with the squery, it is a very simple code: public MyListener() { string query = "SELECT * FROM TransferToSIP WHERE hasBeenRead = false"; SqlDependency.Start(getConnectionString(), query); } That is the constructor. i call it like this: new...