ADO Recordset Save as XML error

P

pierre.saucin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top