PreviousNextIndex

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:

The following code snippet shows the correct order for using the MaxDataGuess property:

DEFINE VARIABLE rBindS AS Progress.Data.BindingSource NO-UNDO. 
DEFINE VARIABLE hQuery AS HANDLE                      NO-UNDO. 
ASSIGN 
  rBindS              = NEW Progress.Data.BindingSource() 
  rBindS:MaxDataGuess = 200000. 
CREATE QUERY hQuery. 
hQuery:SET-BUFFERS(BUFFER Customer:HANDLE). 
hQuery:QUERY-PREPARE("FOR EACH Customer NO-LOCK"). 
hQuery:QUERY-OPEN(). 
rBindS:Handle = hQuery. 

See also: Count property


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex