Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 21: Building Multiuser Applications


767


Refresh Interval
In multiuser environments, data is extremely volatile because it can be changed by many different
people during the course of a day or even an hour. You want users to see the most current data
displayed on forms and datasheets, so that they don’t make decisions based on information that is
no longer valid. Refresh Interval tells Access how long to wait before refreshing the data displayed
in a form or datasheet with current data. The default is 30 seconds, the minimum is 0 seconds, and
the maximum is 32,766 seconds (which is roughly 9 hours).

Tip
In situations where data will be added or edited frequently, set the Refresh Interval fairly low (say, 3 seconds).


Note
Access doesn’t requery the data; it only refreshes it. Requerying reissues the query behind the recordset dis-
played. To illustrate the difference, imagine that two users are editing data and one of the users deletes a record
from a table that the other user is viewing. When Access refreshes the underlying table for the second user, the
record viewed will display #Deleted in all the columns of the record. If the form or datasheet is queried again,
the new recordset won’t display the record at all because it no longer resides in the underlying table.


Number of Update Retries
When two users try to update the same record at the same time, Access captures the error and tries
to recover using the Number of Update Retries setting. The Number of Update Retries setting tells
Access how many times to attempt to update the record before it raises an error condition. The
default is 2, the minimum is 0, and the maximum is 10.

Tip
In situations where you anticipate a high number of locking conflicts, set this option to a high number.


ODBC Refresh Interval
This setting is much like the Refresh Interval one, except that special considerations must be made
when using external data sources. ODBC links can be slow, and queries executed against these
back-end databases can consume a lot of time and increase network traffic. When you’re using
ODBC data sources, the ODBC Refresh Interval should be set higher than you would set the
Refresh Interval of an Access database. The default is 1,500 seconds (25 minutes), much higher
than the Refresh Interval default of 30 seconds. The ODBC Refresh Interval’s maximum setting is
much smaller, too: 3,600 seconds (1 hour).

Caution
Before setting this option, experiment with the speed of your queries and tables, and monitor network
resources when you issue reads from your back end. Setting the ODBC Refresh Interval too low will really bog
down the system as Access hits the ODBC data source looking for data changes.

Free download pdf