SqlDataReader.NextResult Method

Definition

Advances the data reader to the next result, when reading the results of batch Transact-SQL statements.

C#
public override bool NextResult ();

Returns

true if there are more result sets; otherwise false.

Implements

Remarks

Used to process multiple results, which can be generated by executing batch Transact-SQL statements.

By default, the data reader is positioned on the first result.

Applies to

Product Versions
SqlClient .NET Core 1.0, 1.1, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Framework 1.0, 1.1, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Standard 1.0, 1.1, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2