ADO Recordset Save as XML error

Discussion in 'XML' started by pierre.saucin@skynet.be, Nov 15, 2005.

  1. Guest

    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
    , Nov 15, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mac

    Load XML from ADO Recordset

    Mac, Jan 13, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    677
  2. nita
    Replies:
    1
    Views:
    856
    Saravana
    Nov 20, 2004
  3. Replies:
    0
    Views:
    593
  4. Kasp
    Replies:
    0
    Views:
    432
  5. Kasp

    ADO Recordset Save as XML error

    Kasp, Nov 15, 2005, in forum: ASP General
    Replies:
    10
    Views:
    381
    Bob Barrows [MVP]
    Nov 16, 2005
Loading...

Share This Page