ADO Recordset Save as XML error



When I try and save out a recordset from an ASP page as XML I get the
following error (the code is below) - I have ADO 2.8 installed and this
is running on win XP sp2 :

----------------------------------------------------------

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

----------------------------------------------------------
Const adOpenStatic    = 3
Const adLockReadOnly  = 1
Const adCmdText       = 1
Const adPersistXML    = 1

Dim rS
Dim conn
Dim sql
Dim xmlDoc

Set rS = Server.CreateObject ("ADODB.Recordset")
Response.ContentType = "text/xml"

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=Test;UID=sa;PWD="

set xmlDoc=Server.CreateObject("Microsoft.XmlDom")
xmlDoc.async = false
xmlDoc.preservewhitespace = false

sql = "SELECT * FROM test"
rS.open sql, conn, adOpenStatic, adLockReadOnly, adCmdText
rS.save xmlDoc, adPersistXML
rS.close

Set conn = nothing
Set rs = Nothing

-----------------------------------------------------------
Any ideas?  Thanks.

Pierre


.



Relevant Pages