absolute is a method of the SapDB_ResultSet class (sdb.sql module). You can use this method to position the cursor at a specific position in the result set.
Syntax
absolute (pos)
Attribute |
Description |
---|---|
pos |
Position of the data record you want to read in the result set pos ≥ 1: Position is calculated from the beginning of the result set pos = 1: First record in the result set pos ≤ -1: Position is calculated from the end of the result set pos = -1: Last record in the result set |
Data record at the specified position in the result set
If the result set is empty or if pos exceeds the number of data records in the result set: None
You position the cursor on the third record in the result set:
Syntax
row = cursor.absolute (3)
You position the cursor on the second-to-last record in the result set:
Syntax
row = cursor.absolute (-2)
Example: Executing an SQL Statement and Navigating in the Result Set