ADODB Object
 
Syntax
 
commandobject.CommandStream = string
string = commandobject.CommandStream
 
Description
Identifies the Stream object containing the command details.
The CommandStream property, new to ADO 2.6, identifies the Stream containing the command details. This can be any valid Stream object, or any object that supports the IStream interface. An example is an input stream (Request) in an ASP page that contains command details. This is possible because, as of ASP version 3.0, the Request object supports the standard COM IStream interface. The output of a query can also be stored in a Steam by means of the dynamic 'Output Stream' property.
 
Note that the CommandStream and CommandText properties are mutually exclusive; setting one will clear the other.
See Also
Example
 
<%
Set objCommand = Server.CreateObject("ADODB.Command")
Set objCommand.CommandStream = Request
objCommand.ActiveConnection = "..."
objCommand.Dialect = "..."
objCommand.Properties("Output Stream") = Response
objCommand.Execute
%>
 
Explanation:
 
In the following example the contents of the Request object in an ASP page are assigned to the CommandStream property, and the results to the dynamic 'Output Stream' property.
 
Another particularly good way in which a Command Stream can be used is in the executing of XML commands against SQL Server 2000. It can also be used to obtain XML data directly from SQL Server 2000.