Beispiel #1
0
        bool NextResult()
        {
            ValidateState();

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

            try {
                moreResults = command.Tds.NextResult();
            } catch (TdsInternalException ex) {
                command.Connection.Close();
                throw SybaseException.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;
                dataTypeNames = null;
            }

            rowsRead     = 0;
            resultsRead += 1;
            return(moreResults);
        }