Entering content frame

 Method relative 

Definition

relative (offset)

Use

relative is a method of the class SapDB_ResultSet. You position the cursor offset records ahead, to extract the record at this position.

relative (1) matches next ().

If you give offset a negative value, the cursor moves back in the results set. In this way, relative (-1) matches previous ().

Result

The record is extracted.

If you specify a value for offset that exceeds the number of records before or after the current cursor position, then the value of the result is None.

row = cursor.relative (5)

row = cursor.relative (-1)

See also: Examples for SapDB_ResultSet

 

Leaving content frame