To support retrieval of multi-row result sets from your database, DB/Assist generates the code for multi-row SELECT, statements as cursor-based statements. (For information about the code generated for these statements, see Compiling SQL Access Modules.)
The benefits of using cursor-based SQL statements in your application follow.
•Reduces memory requirement.
•Controls the amount and display of data.
Cursor-based SQL statements reduce the memory requirement of an application by programmatically controlling the amount of data stored at one time.
For example, if a SQL statement required to generate a report is several pages long, you may want to display a single page in an ESL Table Object instead of all pages. When the user is finished viewing the first page, you can replace the data in the table object with the second page.
Cursor-based SQL statements control the amount of data and when it is displayed, thereby allowing you to adjust your application's performance.
In some situations, it is better to retrieve all the data and then display it. In other situations, it is more efficient to retrieve data as it is needed. You can choose which method best meets the needs of your application.