DB2 Version 10.1 for Linux, UNIX, and Windows

DB2Command.ExecutePageReader Method

Returns a DB2DataReader instance containing a requested set of rows.

Namespace:
IBM®.Data.DB2®
Assembly:
IBM.Data.DB2 (in IBM.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);

Version information

Last update
This topic was last updated for: IBM DB2 Version 9.7
.NET Framework version
Supported in: 2.0, 3.0, 3.5 and 4.0
IBM Data Server Client
Supported in: IBM DB2 Version 9