Command 对象有两个属性叫Input Stream和Output Stream属性的值是一个IUnknown接口可以把一个XML Parser的接口赋给它或者是直接用RequestResponse等这样的好处是不需要再去生成一个Recordset不需要去保存这些数据从而节省了系统开销
下面给大家一个简单的把XML用Response返回的Example:
〈%@ Language=VBScript %>
〈! #include file=ADOVBSinc >
〈%
Dim objConn objCmd i
Set objConn = Servercreateobject(ADODBCONNECTION)
objConnOpen Provider=SQLOLEDB;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=PBA;Data Source=(local)
Set objCmd = ServerCreateObject(ADODBCommand)
objCmdActiveConnection = objConn
objCmdProperties(Output Stream) = Response
objCmdProperties(XML Root) = root
objCmdCommandText = Select * from UserStatus for XML Auto
ResponseContentType = text/xml
objCmdExecute i adExecuteStream
Set objCmd = Nothing
objConnClose
Set objConn = Nothing
%>