Parameters
- behavior
- One of the System.Data.CommandBehavior values.
- startRecord
- Specifies the number of starting record of the set of records to be returned.
- maxRecords
- Specifies total number of records to retrieve.
Use method ExecutePageReader when you want to retrieve not the whole dataset but some part of it that begins with given row number and has certain quantity of rows. This is especially useful when working with large amounts of data.
If you want to retrieve all data in a dataset, use ExecuteReader() instead.
Note: This method is not supported in .NET Standard 1.3 compatible assembly. It is available only in the assembly for full .NET Framework and .NET Standard 2.0 compatible assembly.
ExecutePageReader method puts on following restrictions on the executable statement:
- you cannot execute stored procedures and PL/SQL blocks;
- you may specify only SQL statement that can be placed into the subquery.
To use ExecutePageReader method it is recommended to optimize a query for retrieving a first row, otherwise using this method is ineffective.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2