Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does the 'set refresh' apply to non-browse/memo data?
Message
From
28/02/2002 04:24:51
 
 
To
27/02/2002 17:26:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00626051
Message ID:
00626230
Views:
13
Hi!

1. VFP cache all aliases data in the memory for the best speed of data reading and processing.

Take a look to the help - there are 2 parameters. First affects only browse windows automatic refreshing period. Second affects VFP internal buffers refreshing period. So when the second setting is not zero, buffered data for any alias will be re-loaded into the memory with that period of time. You can also loch the file that will refresh data in memory immediately, or use sys(1104) function that will do this for all aliases at once as soon as possible, that is better because SET REFRESH allow minimum value 1 second for automatic refreshing.

To demo the behaviour of that setting, just create a form with grid, put the timer on the form and refresh the grid in the timer event, say, each 1 second. Open the table in another instance of FoxPro and adit records in the table, then see how grid is refreshed in the first instance of VFP. When SET refresh is 5, you will have t wait 5 to 10 seconds for changes appearing in the grid refreshed by timer. If you will put sys(1104) in the timer event, the data will be refreshed immediately each second. When you set second parameter in SET REFRESH to 0, no refreshing will occur till you force a refresh.

2. It is usable for multi-user applications only, mostly to refresh data very quickly in real-time. No need to change it from default value (5 seconds) in otehr cases.

3. No. It works only for VFP aliases.

>I'm in the process of doing a code review and came across the 'set refresh' command in some code.
>
>1. Does this command apply to DBF data that is NOT involved in browse/memo windows? The VFP7 help leads one to believe this command applies only to browse/memo windows, BUT then in the Remarks section of the same help topic, it says ...
>
>'SET REFRESH can also be used to specify how often data buffered locally on your workstation is updated'.
>
>2. Is there a rule of thumb for setting 'set refresh' values for single and multi-user applications?
>
>3. Is there any reason to use this command (change its defaults) for MSDE/SQL server or ADO type applications?
>
>Thanks!
>Malcolm
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform