jeronimovilar Active Member Licensed User Longtime User Mar 19, 2019 #1 My application was B4a 2.02 Version. In new version i changed httputils for the libraries HttpUtils2, but shows ther error now: Error description: Undeclared variable 'httputils' is used before it was assigned any value.Error occurred on line: 151 (Main) Line 151: HttpUtils.PostString("LINGUAGEM", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet") What do i change?
My application was B4a 2.02 Version. In new version i changed httputils for the libraries HttpUtils2, but shows ther error now: Error description: Undeclared variable 'httputils' is used before it was assigned any value.Error occurred on line: 151 (Main) Line 151: HttpUtils.PostString("LINGUAGEM", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet") What do i change?
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2019 #2 You should use OkHttpUtils2. You were using the very old HttpUtils (1). The syntax is a bit different and is simpler. Check this: [B4X] OkHttpUtils2 with Wait For Upvote 0
You should use OkHttpUtils2. You were using the very old HttpUtils (1). The syntax is a bit different and is simpler. Check this: [B4X] OkHttpUtils2 with Wait For
jeronimovilar Active Member Licensed User Longtime User Mar 19, 2019 #3 I called the .PostString with address url (in old version): ServerUrl = "http://192.168.0.1/base3.asp" HttpUtils.PostString("NAME", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet") New Version: J.PostString(("NAME", "query=select%20LINGUAGEM%20from%20wInternet") Where do i configure the server address? Upvote 0
I called the .PostString with address url (in old version): ServerUrl = "http://192.168.0.1/base3.asp" HttpUtils.PostString("NAME", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet") New Version: J.PostString(("NAME", "query=select%20LINGUAGEM%20from%20wInternet") Where do i configure the server address?
DonManfred Expert Licensed User Longtime User Mar 19, 2019 #4 https://www.b4x.com/android/help/appupdating.html#httpjob https://www.b4x.com/android/help/appupdating.html#httpjob_poststring Upvote 0
https://www.b4x.com/android/help/appupdating.html#httpjob https://www.b4x.com/android/help/appupdating.html#httpjob_poststring
jeronimovilar Active Member Licensed User Longtime User Mar 19, 2019 #5 Sorry, but i dont know what the use for call the SQL sintaxe and the server addres yet. PostString? PutString? Please, How to change this (old version): HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")?? I´m not expert Upvote 0
Sorry, but i dont know what the use for call the SQL sintaxe and the server addres yet. PostString? PutString? Please, How to change this (old version): HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")?? I´m not expert
DonManfred Expert Licensed User Longtime User Mar 19, 2019 #6 Watch the Tutorials about okhttputils2. Search the forum for examples. There are hundrets Upvote 0
DonManfred Expert Licensed User Longtime User Mar 19, 2019 #7 jeronimovilar said: HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")?? Click to expand... Code: Copy Dim j As HttpJob j.Initialize("JobCase", Me) j.PostString("http://192.168.0.100/base3.asp","Select * from table") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release Upvote 0
jeronimovilar said: HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")?? Click to expand... Code: Copy Dim j As HttpJob j.Initialize("JobCase", Me) j.PostString("http://192.168.0.100/base3.asp","Select * from table") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release
jeronimovilar Active Member Licensed User Longtime User Mar 19, 2019 #8 Thank you. it work, but.... I set one more value in old version that was see in JobDone: HttpUtils.PostString("NAME", "link", "sql") Sub JobDone (Job As String) If Job = "NAME" Then ' fisrt value in PostScript .... Is it possible yet?? Upvote 0
Thank you. it work, but.... I set one more value in old version that was see in JobDone: HttpUtils.PostString("NAME", "link", "sql") Sub JobDone (Job As String) If Job = "NAME" Then ' fisrt value in PostScript .... Is it possible yet??
DonManfred Expert Licensed User Longtime User Mar 19, 2019 #9 1. You should start a new thread for any new question you have. 2. Check the available okhttputils examples. There are a lot. Get familar with okhttputils. 3. Please post MORE DETAILED questions in the new thread. Honestly i did not understand your question at all. 4. I never worked with the httputils (1) version. so i don´t know what you are talking here. Upvote 0
1. You should start a new thread for any new question you have. 2. Check the available okhttputils examples. There are a lot. Get familar with okhttputils. 3. Please post MORE DETAILED questions in the new thread. Honestly i did not understand your question at all. 4. I never worked with the httputils (1) version. so i don´t know what you are talking here.