Idea Details

CA 2e Define SQL cursors as scrollable

Last activity 27 days ago
Eamonn Foley's profile image
06-25-2019 05:34 PM

As a 2e developer I have certain business scenarios which require me to re-read the previous data base record when loading a screen subfile.  This could be accomplished via a simple user source that would perform a traditional I/O read prior.  

Under DDL this is will not work as the default definition of the cursor is non-scrollable.  

The solution is to add the keyword scroll after the cursor name but before the keyword cursor.
For example:
Currently Generate Code

       EXEC SQL
              DECLARE C1ACV10XCSR CURSOR FOR

New generated code
       EXEC SQL
              DECLARE C1ACV10XCSR SCROLL CURSOR FOR      

This will enable us to define our own read prior as needed