473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Update web page when database changes

Hello,

I have a web page that displays information from a SQL database and
this information can change frequently. Basically, a database entry is
made into a table every time a person enters or leaves a defined area
and I need to display this information to a user watching a monitor.
Automatically refreshing the page is not a good option because it would
have to refresh no more than every 5 seconds and the screen flashes are
annoying. I have set up a Cache Dependency for the table and it
creates a file on the server every time there is a change in the table.
I then have a function that compares the last accessed time of the
file so I know when a change has occurred and can then refresh the
page.

How do I get the function to continuously check the file to see if a
change occurred once the page is loaded? Is there a better way to
refresh the data on my page without doing a refresh every few seconds?

Thanks,

Chad

Nov 19 '05 #1
1 7434
Assuming you must have a thin client (no .NET framework on the client) then
the web page must make a request to the server every N seconds to see if
there are any updates. The server cannot contact the client to let it know
about changes.
Since you don't like the screen flashing during the refresh every 5 seconds,
you could use SmartNavigation or some kind of AJAX / XMLHttp / Web Service
solution to have the page make a callback without refreshing the entire
page.

Here's more info:
http://msdn.microsoft.com/library/de...ationTopic.asp
http://www.codeguru.com/Csharp/.NET/...cle.php/c9679/

This kind of thing gets easier in ASP.NET 2.0 if you can wait until then:
http://www.developer.com/net/asp/article.php/3506896

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<cg******@brgov.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello,

I have a web page that displays information from a SQL database and
this information can change frequently. Basically, a database entry is
made into a table every time a person enters or leaves a defined area
and I need to display this information to a user watching a monitor.
Automatically refreshing the page is not a good option because it would
have to refresh no more than every 5 seconds and the screen flashes are
annoying. I have set up a Cache Dependency for the table and it
creates a file on the server every time there is a change in the table.
I then have a function that compares the last accessed time of the
file so I know when a change has occurred and can then refresh the
page.

How do I get the function to continuously check the file to see if a
change occurred once the page is loaded? Is there a better way to
refresh the data on my page without doing a refresh every few seconds?

Thanks,

Chad

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
4
by: gj | last post by:
Hi, I'm trying to update a sql database from a web form using text boxes. I'm trying to learn C# on my own so I am at a complete loss. I created my sql connection, data adapter, dataset and data...
4
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
11
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know...
2
by: BobLewiston | last post by:
Some of you may have seen my earlier thread “PasswordHash NULL problem”. I’ve started a new thread because investigation has shown that the problem is actually quite different than I previously...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.