vb.net 2005 smart device sendign XML

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

Im using vb.net 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
  • 3
  • 3
LVL 48

Expert Comment

ID: 19644773
why not use the Session Variable

Author Comment

ID: 19645868
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

ID: 19646023
Session["YourVariable"] = "Whatever";

if(Session["YourVariable"] == "Whatever")
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.


Author Comment

ID: 19646638

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.
www.mysite.com?mystring=blablabla. 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

Mikal613 earned 1000 total points
ID: 19646745

Author Comment

ID: 19646847

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.

Expert Comment

ID: 20210478
Forced accept.

EE Admin

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 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