?
Solved

JavaScript to sense when a record has been updated in MSSQL

Posted on 2014-07-30
4
Medium Priority
?
213 Views
Last Modified: 2014-08-01
Hello,

I'm looking for a script to sense when a record in an MSSQL DB has been updated, to then refresh the page.  I am trying to avoid using a timer and was wondering if there is a way to do this...?

Thanks in advance!
0
Comment
Question by:Nico2011
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1000 total points
ID: 40229019
To understand what is going on here, you need to understand the nature of the client/server protocol.  This article should help you get that part.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/A_11271-Understanding-Client-Server-Protocols-and-Web-Applications.html

Executive summary: Only the client can make a request; the server cannot initiate the communication.  You almost certainly need to use a timer to drive AJAX requests to a script on the server that can sense the condition you want to detect.
0
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 1000 total points
ID: 40229065
This is something I have looked at myself and not implemented.  This example shows how this can work with node.js and azzure but you can substitute for your own db  http://azure.microsoft.com/en-us/documentation/articles/sql-database-nodejs-how-to-use/
0
 

Author Closing Comment

by:Nico2011
ID: 40234186
Thank you both - both were correct and pointed me in the right direction, so I shared the points!
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

741 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