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.WriteStartEleme nt("resuls tin")
Do While DR1.Read()
xmlWriter2.WriteStartEleme nt("res")
xmlWriter2.WriteElementStr ing("qid", DR1.GetInt32(0)) 'questionid
xmlWriter2.WriteElementStr ing("ans", HTMLReplace(DR1(1).ToStrin g)) 'ans answerid see function HTMLReplace
xmlWriter2.WriteElementStr ing("rid", SiteResultID1) 'resultid
xmlWriter2.WriteEndElement ()
Loop
xmlWriter2.WriteEndElement ()
TheSTr = URLSite & "ppc_evals/data_in.aspx?UI D=" & userid & "&PID=" & Programid & "&resultin="
TheSTr = TheSTr & Sw2.ToString
TheSTr = Replace(Replace(Replace(Re place(TheS Tr, "<", "|"), ">", "*"), vbCr, ""), vbCrLf, "")
SiteResultID2 = GetWebPageResult(TheSTr)
[/code]
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.WriteStartEleme
Do While DR1.Read()
xmlWriter2.WriteStartEleme
xmlWriter2.WriteElementStr
xmlWriter2.WriteElementStr
xmlWriter2.WriteElementStr
xmlWriter2.WriteEndElement
Loop
xmlWriter2.WriteEndElement
TheSTr = URLSite & "ppc_evals/data_in.aspx?UI
TheSTr = TheSTr & Sw2.ToString
TheSTr = Replace(Replace(Replace(Re
SiteResultID2 = GetWebPageResult(TheSTr)
[/code]
why not use the Session Variable
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")
{
}
if(Session["YourVariable"]
{
}
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Computer101
EE Admin