| Home | Previous Lesson: Prompt for Criteria Next Lesson: Suppressing Repeating Values |
Sometimes, a query might return hundreds of rows and take time to retrieve all that data. A typical user (any user for that matter) would like to have a quick response time. PowerBuilder, by default doesn't display the data in the DataWindow until it completes retrieving all the data. To force PowerBuilder into displaying data as it retrieves, or to retrieve data only so much as to display one full screen, you need to turn on 'Rows > Retrieve Options > Retrieve As Needed' menu option.
For example, let's say, you select the above options and you are expecting the query to return 2,000 rows and say, only 12 rows can fit at a time on the window. Now, if you retrieve the data, PowerBuilder retrieves only 12 rows. When the user scrolls, PowerBuilder needs data to display so it will retrieve another 12 rows and display them on the screen.
In another situation, may be you wanted to bring the whole data from a table that has say 20,000 rows. The memory may not be enough to bring all that data. Hence, select 'Rows > Retrieve Options > Rows to Disk' menu option. PowerBuilder writes the data to the disk as it retrieves and you will not get 'Your system is running out of memory, Please close some applications' error message from the MS-Windows operating system.
| Home | Previous Lesson: Prompt for Criteria Next Lesson: Suppressing Repeating Values |