MaxDataGuess property
(Windows only; GUI for .NET only)An estimate of the number of records that a query will return. The property’s default value is zero.
Data type: INTEGER
Access: PUBLIC Readable/Writable
Applies to: Progress.Data.BindingSource class
The MaxDataGuess property offers a time-saving alternative for a ProBindingSource that binds to a query with a large result set. Some .NET controls need to know the number of records in the result set when they initialize. By default, the ProBindingSource counts the records by reading the records in the query’s result set, which can be time-consuming for large result sets. Setting this property provides the .NET control with an estimated value to bypass the counting process.
Because the .NET control used an estimated number when it visualized, you might see it readjust as the ProBindingSource’s Count property develops a more accurate count of the records. For example, you might notice the vertical scrollbar thumb of a grid changing size to more accurately reflect the number of displayed records.
When using this property, remember the following:
- Set MaxDataGuess before opening the query.
- Set MaxDataGuess before setting the ProBindingSource’s Handle property.
- The MaxDataGuess and Batching properties cannot both be TRUE at the same time. The ProBindingSource throws an exception if this happens.
- Do not open the query with the PRESELECT option. This is an exception to the normal rule with ProBindingSource queries. Since a PRESELECT query builds the entire result list, it negates the optimization from MaxDataGuess.
The following code snippet shows the correct order for using the MaxDataGuess property:
See also: Count property
OpenEdge Release 10.2B
|