Solved 2005 smart device sendign XML

Posted on 2007-08-06
Last Modified: 2013-12-27

Im using 2005 to build a smart smart device application. Right now im digging into a sql ce DB and basically sending the data as text via the url.  Just my luck the string gets to long for the url (Its somtime 2600 chars +)

I know there's a better way than to send the data in the URL.  My problem is I don;t know what its called and if I did don't know how to do it since it involves sending the MXL data up to a web site and then
having the website read it and then stuff it into the data  base. I can hadle the data base issues. Its sendig the XML and having the site read it that I dont have a cllue. Can someone send me a good link or a small samble on how to do this.



Dim Sw1 As New StringWriter
Dim xmlWriter1 As New XmlTextWriter(Sw1)

bla bla

            sqlstr = ("Select questionid, answer from resultitems where resultid = " & DRCompleted(0) & " ")
            Cmd2.CommandText = sqlstr
            Cmd2.Connection = SqlCeConn
            DR1 = Cmd2.ExecuteReader()
            Do While DR1.Read()
                xmlWriter2.WriteElementString("qid", DR1.GetInt32(0)) 'questionid
                xmlWriter2.WriteElementString("ans", HTMLReplace(DR1(1).ToString)) 'ans answerid see function HTMLReplace
                xmlWriter2.WriteElementString("rid", SiteResultID1) 'resultid

  TheSTr = URLSite & "ppc_evals/data_in.aspx?UID=" & userid & "&PID=" & Programid & "&resultin="

            TheSTr = TheSTr & Sw2.ToString

            TheSTr = Replace(Replace(Replace(Replace(TheSTr, "<", "|"), ">", "*"), vbCr, ""), vbCrLf, "")

            SiteResultID2 = GetWebPageResult(TheSTr)  
Question by:gosonic
    LVL 48

    Expert Comment

    why not use the Session Variable

    Author Comment

    Hi.  I'm not sure what you mean. I know what a seesion var is but not how to use it in this instance
    LVL 48

    Expert Comment

    Session["YourVariable"] = "Whatever";

    if(Session["YourVariable"] == "Whatever")

    Author Comment


    Yes that part I understand. I don't think were on the same sheet of music though.
    The information I have is in a handheld application. I pull it out of the DB and wrap it up in xml.
    I want to send it to a wesite/service I have. I've been sending it as a string through the actual URL. The string is to long to send in the url as it excedds (its 2600+ characters.) the url's limit.  So I need to send it some other way. What I 've been reading keeps saying send it as a stream and not in the url.

    I hope this makes sense


    LVL 48

    Accepted Solution


    Author Comment


    Yeah I guess HA.
    Not sure.   I need to send it to the webservice from the PDA's embedded application.
    It'll be the same as sending it from a desktop application to a webservice.

    Any ideas on that one.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
    You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now