vb to xml sending data to the server and save it as xml file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: vb to xml sending data to the server and save it as xml file

  1. #1
    prasad sawant Guest

    vb to xml sending data to the server and save it as xml file


    Currently i devloping a program through which user can send the data from
    the client to the sever i am using vb program as a client

    I am not able to save a file on the sever

    VB Program
    Dim objectSendXMLDOM As New MSXML.DOMFreeThreadedDocument
    Dim objXMLHTTP As New MSXML.XMLHTTPRequest
    Private Sub cmdAdd_Click()
    AddingIntoXmlDom
    End Sub
    Function AddingIntoXmlDom()
    Dim s As String
    Dim Name, Address As String

    Name = txtName.Text
    Address = txtAddress.Text

    s = "<?xml version='1.0'?>"
    s = s + "<PUBLISHERS>"
    s = s + "<PUBLISHER>"
    s = s + "<NAME>" & Name & "</NAME>"
    s = s + "<ADDRESS>" & Address & "</ADDRESS>"
    s = s + "</PUBLISHER>"
    s = s + "</PUBLISHERS>"

    With objectSendXMLDOM
    .async = False
    .Load s
    .save "http://localhost/x.xml"
    End With

    With objXMLHTTP
    .open "POST", "http://localhost/updatedata.asp", False
    .send objectSendXMLDOM
    End With
    ---------------
    Asp program
    ----------------
    <%
    Set doc = Server.CreateObject("MICROSOFT.XMLDOM")
    doc.load(Request)
    Set result = Server.CreateObject("MICROSOFT.XMLDOM")
    Response.ContentType = "text/xml"
    result.save(server.MapPath("x.xml"))
    %>






  2. #2
    Russell Jones Guest

    Re: vb to xml sending data to the server and save it as xml file

    Make sure that the Web server account has write access for the directory in
    which you're trying to save the file.

    "prasad sawant" <pdsaw@rediffmail.com> wrote in message
    news:3aae6c84$1@news.devx.com...
    >
    > Currently i devloping a program through which user can send the data from
    > the client to the sever i am using vb program as a client
    >
    > I am not able to save a file on the sever
    >
    > VB Program
    > Dim objectSendXMLDOM As New MSXML.DOMFreeThreadedDocument
    > Dim objXMLHTTP As New MSXML.XMLHTTPRequest
    > Private Sub cmdAdd_Click()
    > AddingIntoXmlDom
    > End Sub
    > Function AddingIntoXmlDom()
    > Dim s As String
    > Dim Name, Address As String
    >
    > Name = txtName.Text
    > Address = txtAddress.Text
    >
    > s = "<?xml version='1.0'?>"
    > s = s + "<PUBLISHERS>"
    > s = s + "<PUBLISHER>"
    > s = s + "<NAME>" & Name & "</NAME>"
    > s = s + "<ADDRESS>" & Address & "</ADDRESS>"
    > s = s + "</PUBLISHER>"
    > s = s + "</PUBLISHERS>"
    >
    > With objectSendXMLDOM
    > .async = False
    > .Load s
    > .save "http://localhost/x.xml"
    > End With
    >
    > With objXMLHTTP
    > .open "POST", "http://localhost/updatedata.asp", False
    > .send objectSendXMLDOM
    > End With
    > ---------------
    > Asp program
    > ----------------
    > <%
    > Set doc = Server.CreateObject("MICROSOFT.XMLDOM")
    > doc.load(Request)
    > Set result = Server.CreateObject("MICROSOFT.XMLDOM")
    > Response.ContentType = "text/xml"
    > result.save(server.MapPath("x.xml"))
    > %>
    >
    >
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center