Consultor Eletrônico



Kbase 22107: Query on Dynamic Browse Lost with SET-BUFFERS()
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/08/2002
SUMMARY:

When using the SET-BUFFERS() method on a query object, any browse associated with the query will lose its query and columns.

This behavior has been witnessed as of 9.1D where the BROWSE is
notified that the fields are mixed up, so the next time you do anything with it, it drops its columns.

Versions prior to 9.1D may have seemed to work, but were in fact working incorrectly in that the buffer was not emptied as it should be when calling SET-BUFFERS().

EXPLANATION:

The reason for this loss of data is that the browse columns point at the buffer-fields of the buffers in the query before the SET-BUFFERS()
happens. After the SET-BUFFERS(), there are now new buffer-fields for
different buffer objects altogether. So, when you do a SET-BUFFERS(),
you are actually creating a brand new query, and you need to tell the
browse. You have invalidated all the browse columns, and they need to be re-created.

With previous versions, the columns of the browse and the buffer-field
objects in the query are randomly matched, with the browse pointing off at some other set of buffer-fields.
This situation ends up in a GPF about half the time, so we have
disallowed it.

SOLUTION:

After using SET-BUFFERS(), you need to use BROWSE:QUERY to reset any
browse's query, and re-generate the browse columns with something like
BROWSE:ADD-COLUMNS-FROM.