ExecuteToStream
This method executes a command using the XmlCommandType
and CommandText
properties and appends the result as an XML document to the existing Stream
provided by the application.
Declaration
// C#
public void ExecuteToStream(Stream outputStream);
Parameters
-
outputStream
A
Stream
.
Remarks
The behavior of ExecuteToStream
varies depending on the XmlCommandType
property value:
-
XmlCommandType
=OracleXmlCommandType.None
ExecuteToStream
throws anInvalidOperationException
. -
XmlCommandType
=OracleXmlCommandType
.Query
ExecuteToStream
executes the select statement in theCommandText
property, and if successful, appends the XML document that was generated to the givenStream
.If the SQL query does not return any rows, then nothing is appended to the given
Stream
. The character set of the appended data is Unicode. -
XmlCommandType
=OracleXmlCommandType
.Insert
,OracleXmlCommandType
.Update
, orOracleXmlCommandType
.Delete
The value of the
CommandText
property is an XML document.ExecuteToStream
saves the changes in that XML document to the table or view that is specified in theXmlSaveProperties
property. Nothing is appended to the givenStream
.