DB2®Command.ExecutePageReader Method
Returns a DB2DataReader instance containing a requested set of rows.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[Visual Basic]
Public Function ExecutePageReader( _
ByVal startRow As int, ByVal numRows As int _
) As DataReader
[C#]
public DataReader ExecutePageReader( int startRow, int numRows);
[C++]
public: DataReader^ ExecutePageReader(
int startRow, int numRows);
[JScript]
public function ExecutePageReader (
startRow : int, numRows : int
) : DataReader
Parameters
- startRow
- Specifies the starting row of the set of rows to be returned.
- numRows
- Specifies total number of rows to be returned.
Return value
Returns a DB2DataReader instance containing a requested set of rows.
Example
[C#] The following example demonstrates the retrieval of a specific set of result set rows. In the example, a DB2DataReader containing rows three through seven is passed back to the application.
[C#]
DB2Command cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM SALES";
DB2DataReader dr = cmd.ExecutePageReader(3, 7);