Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   help!!! ado + xml (http://www.velocityreviews.com/forums/t166545-help-ado-xml.html)

Vincent Jones 02-02-2004 11:00 PM

help!!! ado + xml
 
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"

%>


All times are GMT. The time now is 08:06 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.