Solved

JavaScript to sense when a record has been updated in MSSQL

Posted on 2014-07-30
4
183 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
4 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 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 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now