V
Vincent Jones
Error Type:
ADODB.Command (0x800A0CB3)
Object or provider is not capable of performing requested operation.
<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim conDB, cmdXML
Set conDB = CreateObject("ADODB.Connection")
With conDB
.Provider = "SQLOLEDB"
.ConnectionString = "Data Source=(local);" & _
"INITIAL CATALOG=Northwind;" & _
"INTEGRATED SECURITY=SSPI;"
.Open
End With
Set cmdXML = CreateObject("ADODB.Command")
Set cmdXML.ActiveConnection = conDB
Dim strQry
strQry = "<Invoice xmlns:sql='urn:schemas-microsoft-com:xml-sql'>"
strQry = strQry & "<sql:query>"
strQry = strQry & "Select OrderId, OrderDate From Orders "
strQry = strQry & "Where OrderId = 10248 FOR XML AUTO"
strQry = strQry &"</sql:query></Invoice>"
cmdXML.Dialect = "{5D531CB2-E6ED-11D2-B252-00C04F681B71}"
cmdXML.CommandText = strQry
Dim stmXMLout
Set stmXMLout = CreateObject("Adodb.Stream")
stmXMLout.Open
cmdXML.Properties("Output Stream") = stmXMLout
cmdXML.Execute, , adExecuteStream
Dim strXML
strXML = Replace(stmXMLout.ReadText, ">", ">" & Chr(10) + Char(13))
msgbox strXML, vbInformation, "XML Invoice"
%>
ADODB.Command (0x800A0CB3)
Object or provider is not capable of performing requested operation.
<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim conDB, cmdXML
Set conDB = CreateObject("ADODB.Connection")
With conDB
.Provider = "SQLOLEDB"
.ConnectionString = "Data Source=(local);" & _
"INITIAL CATALOG=Northwind;" & _
"INTEGRATED SECURITY=SSPI;"
.Open
End With
Set cmdXML = CreateObject("ADODB.Command")
Set cmdXML.ActiveConnection = conDB
Dim strQry
strQry = "<Invoice xmlns:sql='urn:schemas-microsoft-com:xml-sql'>"
strQry = strQry & "<sql:query>"
strQry = strQry & "Select OrderId, OrderDate From Orders "
strQry = strQry & "Where OrderId = 10248 FOR XML AUTO"
strQry = strQry &"</sql:query></Invoice>"
cmdXML.Dialect = "{5D531CB2-E6ED-11D2-B252-00C04F681B71}"
cmdXML.CommandText = strQry
Dim stmXMLout
Set stmXMLout = CreateObject("Adodb.Stream")
stmXMLout.Open
cmdXML.Properties("Output Stream") = stmXMLout
cmdXML.Execute, , adExecuteStream
Dim strXML
strXML = Replace(stmXMLout.ReadText, ">", ">" & Chr(10) + Char(13))
msgbox strXML, vbInformation, "XML Invoice"
%>