|
Technical answers from the trenches |
|
Setting the Refresh Rate in Runtime
| ||||
by Lance Leonard |
Posted: 12 July 2000 |
|||
  |
Applies to: Paradox 7.32 and later |
|||
  |
Audience: Intermediate |
|||
Question: In interactive Paradox, you can set the Network Refresh Rate using the Preferences dialogs. However, Runtime does not offer these specific settings in its Preferences dialog. How do you set the refresh rate in Runtime?Answer: By controlling the value in the following Registry setting for Runtime:
HKEY_CURRENT_USER\Software\Corel\
Paradox Runtime\9.0\Pdoxwin\Properties
To do this automatically in your application, use setRegistryKey() in an appropriate location, such as your start-up script or the init() method of your application's initial form. For example, consider the following code:
var
strKeyName String
strSeconds SmallInt
endVar
strKeyName = "Software\\Corel\\Paradox Runtime\\" +
"9.0\\Pdoxwin\\Properties"
strSeconds = "20"
setRegistryValue( strKeyName, "RefreshRate",
strSeconds, regKeyCurrentUser )
Warning: Use care when setting values in the Registry, for it is very easy to make a mistake that can damage your system performance. For best results, back up your Registry on a regular basis. Why is this important?The Refresh Rate controls the amount of time that Paradox (or Runtime) waits between problematic requests on the network. For example, network requests are usually broken into packets. If you have heavy network use, it's possible for these packets to "collide" on your server due to the load. When this happens, the network has to ask the client machine making the original request to repeat and resend the original packet. When this happens, Paradox waits until the refresh period has elapsed before trying the request again. Because this is set to 60 seconds by default, it can seem like your application has hung. A minute is a long time for nothing to be happening on screen. Users generally reboot, which can lead to corrupted tables. By reducing the refresh rate, you can improve the perception your users have regarding your application's performance, thus reducing the number of times they reboot. In turn, this will (hopefully) reduce the number of times you have to deal with corrupted tables or indexes. |
|||
|
||||||||
|
Copyright © 2000-2004, techtricks.com; All Rights Reserved. Acknowledgements, Disclaimers, Terms and Conditions. |
||||||||
|
Article last updated on 11 June 2003
|
||
|
|
||
|
[- End -]
|