示例#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));
		}