Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display a message with some data from sqlserver database, when a specific record is added or a specific event is fired on database.

Is it possible to do so without using timer control.

please help.
Posted
Comments
Rahul.KumarSharma 18-Jul-12 4:18am    
Please explain in detail.
djrocks0101 18-Jul-12 4:24am    
Actually I am using ajax timer( interval=1000) to fetch data from database and wanna know that ,is there any other method to do so because it increases the load on database.
bbirajdar 18-Jul-12 5:13am    
You are on the correct path..Polling is the only option
StianSandberg 18-Jul-12 4:19am    
The coolest way to do this is to use SignalR. :) google it and try it.

A timer is not a control, you can just write a timer in javascript. No, without a timer, you cannot make a website refresh itself, or make an AJAX call without input. This is true if you write the code, or use a third party library. If you don't know that, then you don't understand how the web works.
 
Share this answer
 
Use can user SQL triggers

SQL Triggers[^]
 
Share this answer
 
Comments
djrocks0101 18-Jul-12 4:40am    
How its going to help me on webpage because on webpage I have to check when a trigger is fired.
bbirajdar 18-Jul-12 5:12am    
If you want the webpage data to be refreshed automatically when the data at the backend is changes, you will have to send asyncronous requests to the database from the webpage using ajax calls after a particular interval like 5 seconds.
i agree to use web ajax.trigger performance is not high.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900