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;
}