ExecuteStream
This method executes a command using the XmlCommandType
and CommandText
properties and returns the result as an XML document in a new Stream
object.
Declaration
// C# public Stream ExecuteStream();
Return Value
A Stream
.
Remarks
The behavior of ExecuteStream
varies depending on the XmlCommandType
property value:
-
XmlCommandType
=OracleXmlCommandType.None
ExecuteStream
throws anInvalidOperationException
. -
XmlCommandType
=OracleXmlCommandType
.Query
ExecuteStream
executes the select statement in theCommandText
property, and if successful, returns anOracleClob
object containing the XML document that was generated.OracleClob
contains Unicode characters.If the SQL query does not return any rows, then
ExcecuteStream
returns anOracleClob
object containing an empty XML document. -
XmlCommandType
=OracleXmlCommandType
.Insert
,OracleXmlCommandType
.Update
, orOracleXmlCommandType
.Delete
.The value of the
CommandText
property is an XML document.ExecuteStream
saves the data in that XML document to the table or view that is specified in theXmlSaveProperties
property and an emptyOracleClob
is returned.