Reopen queries
- Last Updated: June 19, 2019
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
If the AutoSync property is TRUE,
using the OPEN QUERY statement or the QUERY-OPEN( ) method to reopen
the query for a bound ABL data source object automatically synchronizes
any bound UI control. Each control's design determines how that
control responds to this synchronization. For example, synchronizing
the screen values in a grid does not usually reset the current position
of the cursor which would produce a change in the ProBindingSource's Position property.
When you bind to a ProDataSet, the ProDataSet buffer's AUTO-SYNCHRONIZE attribute affects the
synchronization behavior. By default, this attribute is FALSE.
So, the AVM does not automatically synchronize all the ProDataSet's
relation queries when one of them is positioned to a different row.
Automatic synchronization might incur unnecessary overhead and slow
your application.
However, if the attribute is TRUE for a specific
buffer, the AVM automatically reopens any child query when your
application navigates to a new parent record in a ProDataSet. When
the ProBindingSource's AutoSync property is TRUE,
this behavior leads to the automatic synchronization of any UI control
bound to the child query. For more information about how to synchronize
ProDataSets, see the chapter on attributes and methods in OpenEdge Development: ProDataSets.
If the ProDataSet buffer's AUTO-SYNCHRONIZE attribute
is FALSE, you can synchronize the data by capturing
the ProBindingSource's PositionChanged event
and calling the ProDataSet's SYNCHRONIZE( ) method.