get current
The EGL get current statement reads the row at which the cursor is already positioned in a relational-database result set.
You can use this statement only if you specified the scroll option in the related open statement.
- record name
- Name of an SQL record.
- from resultSetID
- An ID that ties the get current statement to an open statement run earlier in the same program. For details, see resultSetID.
- into
- Begins an EGL into clause, which lists the items that receive values from a relational-database table.
- item
- An item that receives the value of a particular column. Do not precede the item name with a colon (:).
If you issue a get current statement to retrieve a row that was selected by an open statement that has the forUpdate option, you can do any of these:
- Change the row with an EGL replace statement
- Remove the row with an EGL delete statement
- Change or remove the row with an EGL execute statement
An SQL FETCH statement represents the EGL get current statement in the generated code. The format of the generated SQL statement cannot be changed, except to set the INTO clause.
If an error occurs and processing continues, the cursor remains open.
Finally, when you specify SQL COMMIT or sysLib.commit, your code retains position in the cursor that was declared in the open statement, but only if you use the hold option in the open statement.
Related concepts
resultSetID
SQL support
Related tasks
Syntax diagram
Related reference
delete
execute
get
get absolute
get first
get last
get next
get previous
get relative
EGL statements
open
replace