Kbase 12491: How does the Browse read and maintain records?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
How does the Browse read and maintain records?
You can only associate a browse widget with a 'scrolling' query. By
default, a single-table query caches 50 records, while a multi-table
query caches 30 records in the clients memory as long as PROGRESS
retrieves records with NO-LOCK status. If you specify SHARE-LOCK or
EXCLUSIVE-LOCK record locking, PROGRESS does not cache records.
PROGRESS maintains a result table of RECID's for the query in the
client's .SRT file and expands the table as it reads more of the
query's records. PROGRESS uses the result table to re-find records
it has not already cached.
When PROGRESS opens the query, before it enables the browse widget,
it does not read any records. Once it enables the browse widget,
PROGRESS reads, caches, and enters records into the result table and
displays them in the browse widget. The number of records PROGRESS
reads at this point is determined by the size of the browse widget,
(for example, 10 DOWN) or by the number of records in the query,
whichever is smaller. When you scroll the browse widget from this
initial starting point, PROGRESS caches additional records to the
cache setting and enters them into the result table.
PROGRESS discards the record cache when it executes one of the
following commands. Otherwise, it preserves the cache.
o REPOSITION TO RECID()
o REPOSITION FORWARD/BACKWARD to a record outside the cache
Because cached records might become out of date when they are not
locked, you can either use record locking on the browse widget, set
the query's CACHE to 0 to get a fresh record every time you move the
highlight bar through the browse widget, or use REPOSITION to discard
the current cache.
When you use record locking on DEFINE BROWSE, PROGRESS locks records
as you move the browse widget's highlight bar. If you move the
highlight bar onto a locked record, PROGRESS displays the 'record
in use by...' message. The locking status PROGRESS uses on the
DEFINE BROWSE statement supersedes any it uses on the OPEN QUERY's
record phrase. You can specify the NO-WAIT option with the browse
widget to obtain a "NO-LOCK" copy of a locked record. If no
transaction is active, PROGRESS releases locks as you move the
highlight bar off records.
Progress Software Technical Support Note # 12491