Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Refresh Tables in a C/S Network
Thu, Nov 3 2011 4:44 AMPermanent Link

Thomas

Hi,

what is the best way to refresh tables in a network when many users change records?
With a timer and code, e.g. if table.state in [dsbrowse] then table.refresh? Or in OnAfterPost section? Or is there a function in the Elevate not I find?

Greetings

Thomas
Thu, Nov 3 2011 6:20 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Thomas

There is not a best way. It depends on what you really need.
Timer could be one solution but it can bring other problems too.

Could you post a piece of code of describe better the situation you are
dealing with ?

Eduardo

Thu, Nov 3 2011 7:15 AMPermanent Link

Thomas

Jose,

I have no "real" code. I'm here to play around what is possible.
My concern is, a record is added or changed, should this data set for all other users to be automatically visible.

Greetings

Thomas
Thu, Nov 3 2011 8:25 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Thomas


As Eduardo says a timer is one way. Another alternative I've seen mentioned on the Elevate ngs is a UDP broadcast whenever a table is changed. I believe Tim was working on something along these lines (maybe only for the enterprise edition) but where its up to I have no idea. You could also, possibly, use the Application.OnIdle event. You could also have another table which hold a list of tables that have been changed and check that using a timer. Slightly less intensive / intrusive than simply doing a refresh.

It also depends on the architecture of the system and how sensitive / critical the data is. Do they need to see the current data, or only have the latest when they go to edit or.......


Sometimes the best approach is just a button saying "get the latest data"

Roy Lambert [Team Elevate]
Thu, Nov 3 2011 8:28 AMPermanent Link

Uli Becker

Thomas,

> what is the best way to refresh tables in a network when many users change records?
> With a timer and code, e.g. if table.state in [dsbrowse] then table.refresh? Or in OnAfterPost section?

I am using UDP broadcast when certain records have been entered or altered.

Uli
Thu, Nov 3 2011 1:49 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Thomas,

Just as others said before, in some apps I just use a 'refresh' button for the user to refresh when he wants, and other times I use a timer to automatically refresh. In the latest case, the refresh procedure checks for the state of all datasets in the database and aborts the refresh if any of the datasets is not in dsBrowse mode.

--
Fernando Dias
[Team Elevate]
Image