Link to home
Start Free TrialLog in
Avatar of gosonic
gosonic

asked on

vb.net 2005 smart device sendign XML

Hi,

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.

Thanks


dash


[code]
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()
            xmlWriter2.WriteStartElement("resulstin")
            Do While DR1.Read()
                xmlWriter2.WriteStartElement("res")
                xmlWriter2.WriteElementString("qid", DR1.GetInt32(0)) 'questionid
                xmlWriter2.WriteElementString("ans", HTMLReplace(DR1(1).ToString)) 'ans answerid see function HTMLReplace
                xmlWriter2.WriteElementString("rid", SiteResultID1) 'resultid
                xmlWriter2.WriteEndElement()
            Loop

            xmlWriter2.WriteEndElement()
  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)  
[/code]
Avatar of Mikal613
Mikal613
Flag of United States of America image

why not use the Session Variable
Avatar of gosonic
gosonic

ASKER

Hi.  I'm not sure what you mean. I know what a seesion var is but not how to use it in this instance
Session["YourVariable"] = "Whatever";

if(Session["YourVariable"] == "Whatever")
{
}
Avatar of gosonic

ASKER

Mikal613,
HI,

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

thanks

ASKER CERTIFIED SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gosonic

ASKER


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.
Forced accept.

Computer101
EE Admin