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
-
outputStreamA
Stream.
Remarks
The behavior of ExecuteToStream varies depending on the XmlCommandType property value:
-
XmlCommandType=OracleXmlCommandType.NoneExecuteToStreamthrows anInvalidOperationException. -
XmlCommandType=OracleXmlCommandType.QueryExecuteToStreamexecutes the select statement in theCommandTextproperty, 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.DeleteThe value of the
CommandTextproperty is an XML document.ExecuteToStreamsaves the changes in that XML document to the table or view that is specified in theXmlSavePropertiesproperty. Nothing is appended to the givenStream.