System.Data.SqlClient.SqlDataReader.SqlDataReader.NextResult C# (CSharp) Method

NextResult() public method

public NextResult ( ) : bool
return bool
		bool NextResult ()
		{
			ValidateState ();

			if ((command.CommandBehavior & CommandBehavior.SingleResult) != 0 && resultsRead > 0) {
				moreResults = false;
				rowsRead = 0;
				haveRead = false;
				return false;
			}

			try {
				moreResults = command.Tds.NextResult ();
			} catch (TdsInternalException ex) {
				command.Connection.Close ();
				throw SqlException.FromTdsInternalException ((TdsInternalException) ex);
			}
			if (!moreResults)
				command.GetOutputParameters ();
			else {
				// new schema - don't do anything except reset schemaTable as command.Tds.Columns is already updated
				schemaTable = null;
			}

			rowsRead = 0;
			haveRead = false;
			resultsRead += 1;
			return moreResults;
		}