R roarnold Active Member Licensed User Longtime User Oct 28, 2012 #1 Evening, I am having to place some information on a server via php. So given the amount of variables and not wanting to count the places I thought I could use StringBuilder and convert it to Bytes. Seems that it tells me when I compile that I am either missing "as" or a "(". Below is the code. Could someone help me with what I may be doing wrong. Example: Dim bstring Dim Data() As Byte Dim sb As StringBuilder sb.Initialize waltstring = sb.Append("serialno").Append("chk").Append("comment") Data = "waltstring".GetBytes("UTF8") request.InitializePost2("http://cowboy.ath.cx:00/walt/a4response.php?serial=" As String, Data() As Byte) Log(request) I originally had "URL5" in place of the actual HTTP string but it gave me the same errors. Appreciate the help. Ron :BangHead:
Evening, I am having to place some information on a server via php. So given the amount of variables and not wanting to count the places I thought I could use StringBuilder and convert it to Bytes. Seems that it tells me when I compile that I am either missing "as" or a "(". Below is the code. Could someone help me with what I may be doing wrong. Example: Dim bstring Dim Data() As Byte Dim sb As StringBuilder sb.Initialize waltstring = sb.Append("serialno").Append("chk").Append("comment") Data = "waltstring".GetBytes("UTF8") request.InitializePost2("http://cowboy.ath.cx:00/walt/a4response.php?serial=" As String, Data() As Byte) Log(request) I originally had "URL5" in place of the actual HTTP string but it gave me the same errors. Appreciate the help. Ron :BangHead:
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2012 #2 Please use [ code ] [ /code ] tags (without spaces) when posting code. You should change the line to: Code: Copy request.InitializePost2("http://cowboy.ath.cx:00/walt/a4response.php?serial=", Data) Though the URL seems to be missing a value. Upvote 0
Please use [ code ] [ /code ] tags (without spaces) when posting code. You should change the line to: Code: Copy request.InitializePost2("http://cowboy.ath.cx:00/walt/a4response.php?serial=", Data) Though the URL seems to be missing a value.
R roarnold Active Member Licensed User Longtime User Oct 28, 2012 #3 Erel, Sorry about the code tags. I will try the code you left. I was receive a 404 code but got that resolved. Not sure what you mean by missing something in URL. If referring to the "00" I just changed that as it is a secure server is all. I'll give it a whirl. Thanks, R Upvote 0
Erel, Sorry about the code tags. I will try the code you left. I was receive a 404 code but got that resolved. Not sure what you mean by missing something in URL. If referring to the "00" I just changed that as it is a secure server is all. I'll give it a whirl. Thanks, R
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2012 #4 The value of 'serial' parameter is not set. Upvote 0
R roarnold Active Member Licensed User Longtime User Oct 28, 2012 #5 Hmm, I have it in the Data. All the data is now getting to the db with exception of the answer to the question that is being asked. I left another post on that issue about Sub Global variables giving compile errors Thx Erel, R Upvote 0
Hmm, I have it in the Data. All the data is now getting to the db with exception of the answer to the question that is being asked. I left another post on that issue about Sub Global variables giving compile errors Thx Erel, R