Problem posting xml from vb.net client to asp classic page 
Author Message
 Problem posting xml from vb.net client to asp classic page

Hi All,

I am trying to send an xml recordset that I have updated in my vb.net
application back to an ASP Classic page on my web server so that the changes
can be written to the database. I am getting stuck trying to load the xml
back into a recordset on the server.  The command

    rst.open doc, objConn2

generates the following error:

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

This is my  vb.net client code

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

        Dim a As MSXML2.ServerXMLHTTP
        a = New MSXML2.ServerXMLHTTP()
        a.open("POST", "http://myserver/WebServiceTest/UpdateCustomers.asp",
False)
        a.send(ds.GetXml)
    End Sub

This is my .asp code


<%

    'Load the posted XML document.
    Set doc = Server.CreateObject("Msxml2.DOMDocument")
    doc.load(Request)
' doc.save "C:\NEWXML.XML"

 Set objConn2 = Server.CreateObject("ADODB.Connection")
  strConnection = "Provider=MSDAOSP; Data Source=MSXML2.DSOControl.2.6;"
 objConn2.Open strConnection
 set rst = Server.CreateObject("ADODB.Recordset")
 rst.open doc, objConn2
 'rst.open "C:\NEWXML.XML", objConn2
 Response.Write rst.recordcount

 ObjConn2.close
 Set ObjConn2 = Nothing

%>

However, if I uncomment the lines
   doc.save "C:\NEWXML.XML"
    rst.open "C:\NEWXML.XML", objConn2

and comment out the line
        rst.open doc, objConn2

it all works correctly. I do not want to save the xml to a file first.
How can I load the xml returned from the client directly into a recordset?

TIA
Tony



Sun, 04 Sep 2005 04:07:56 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Date problems with XML in ASP.NET / VB.NET- newbie question

2. British Pound sign disappears when POSTing from ASP to ASPX (VB.NET) page

3. fat client (MSMQ, VB Program) or thin client (ASP page then have Web server use MSMQ)

4. Post data from one page to another (BOA page) vb.net

5. Post Data from page to another (BOA page) in vb.net

6. How to post data from one asp.net page to another

7. Urgent -- how to print document on client's defualt printer using asp.net page

8. Parsing XML from an ASP page that Creates XML fails

9. Debug VB.NET DLL(Class Library) from ASP.NET page

10. Passing Form Fields to VB.NET Custom Business Object in an ASP.NET Code Behind Page

11. From within ASP page - do a POST to another ASP

12. Posting Data from a VB Form to an ASP Page

 

 
Powered by phpBB® Forum Software