Пример #1
0
        public XmlReader EndExecuteXmlReader(IAsyncResult asyncResult)
        {
            ValidateAsyncResult(asyncResult, "EndExecuteXmlReader");
            EndExecuteInternal(asyncResult);
            SqlDataReader    reader     = new SqlDataReader(this);
            SqlXmlTextReader textReader = new SqlXmlTextReader(reader);
            XmlReader        xmlReader  = new XmlTextReader(textReader);

            ((SqlAsyncResult)asyncResult).Ended = true;
            return(xmlReader);
        }
Пример #2
0
        public XmlReader ExecuteXmlReader()
        {
            ValidateCommand("ExecuteXmlReader");
            behavior = CommandBehavior.Default;
            try {
                Execute(CommandBehavior.Default, true);
            } catch (TdsTimeoutException e) {
                throw SqlException.FromTdsInternalException((TdsInternalException)e);
            }

            SqlDataReader    dataReader = new SqlDataReader(this);
            SqlXmlTextReader textReader = new SqlXmlTextReader(dataReader);
            XmlReader        xmlReader  = new XmlTextReader(textReader);

            return(xmlReader);
        }
Пример #3
0
		public XmlReader EndExecuteXmlReader (IAsyncResult asyncResult)
		{
			ValidateAsyncResult (asyncResult, "EndExecuteXmlReader");
			EndExecuteInternal (asyncResult);
			SqlDataReader reader = new SqlDataReader (this);
			SqlXmlTextReader textReader = new SqlXmlTextReader (reader);
			XmlReader xmlReader = new XmlTextReader (textReader);
			((SqlAsyncResult) asyncResult).Ended = true;
			return xmlReader;
		}
Пример #4
0
		public XmlReader ExecuteXmlReader ()
		{
			ValidateCommand ("ExecuteXmlReader", false);
			behavior = CommandBehavior.Default;
			try {
				Execute (true);
			} catch (TdsTimeoutException e) {
				Connection.Tds.Reset ();
				throw SqlException.FromTdsInternalException ((TdsInternalException) e);
			}

			SqlDataReader dataReader = new SqlDataReader (this);
			SqlXmlTextReader textReader = new SqlXmlTextReader (dataReader);
			XmlReader xmlReader = new XmlTextReader (textReader);
			return xmlReader;
		}
Пример #5
0
		public XmlReader ExecuteXmlReader() {
			return SqlXmlTextReader.Create(ExecuteReader(CommandBehavior.SequentialAccess));
		}