It sounds like what you are looking for is RTMP (Real Time Messaging Protocol) which when used with LCDS. This used to be part of Flex Data Services and a light version was provided with ColdFusion. RTMP Data Management provideds exactly what you want. Unfortunately Blaze DS does not have RTMP by default and LCDS is rather costly. Upwards of $40,000 or more for licensing.
There is an opensource flash server called Red5 which "Might" provide similar functionality however I have not used it before and so I am not sure of the limitations and functionality. Still it may be worth a look.
There may also be others available so I would take the time to look around.
Alternately you could implement a timer to check for updates on the server or implement the changes in any number of other ways that can make it appear like the data is updating automatically. In the end though if you want this type of functionality you are really going to want to use RTMP to produce a publish / subscribe system for data management.
Is there a way to refresh a datagrid without clicking a button or refreshing the page if a new entry was inserted into the database.
A new name is inserted in the database, my datagrid will automatically update, it's like real time in updating.
thank you very much!
what kind of project are you going to be including it in?
or are you just messing around with code?
messing around/personal usage, i'd suggest a script acting on a timer request to check the database for any new entries.
with a fully commerical project, you'd have to go the route of developing your own system with the implementation of a send/listener procedure, or as already mentioned, buy a pre-built one.
Hi Matt! Thank you for your answer.
Yeah, that's what I have in my mind, to use timer.
I want my datagrid to be refresh every 20 seconds.
Refresh meaning, to check whether a new data has been inserted to my database/datagrid.
How will I do that?
1 person found this helpful
you should be assigning each entry in your database a unique ID, you can use that.
when the application loads up, query the database and store the ID in a variable. Setup a timer to query the database every 20seconds, if IDs exist that are newer than the one stored, load in the new values and update your stored ID variable. If there are no newer entries, do nothing and start the query process again 20seconds later.