Command Object
Command CommandText
Stream Object
PROPERTY: Command::CommandStream
commandobject.
CommandStream
= string
string =
commandobject.
CommandStream
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.
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.
Code:
<%
Set objCommand = Server.CreateObject("ADODB.Command")
Set objCommand.
CommandStream
= Request
objCommand.ActiveConnection = "..."
objCommand.Dialect = "..."
objCommand.Properties("Output Stream") = Response
objCommand.Execute
%>
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.
Note that the
CommandStream
and
CommandText
properties are mutually exclusive; setting one will clear the other.
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information