Android Question concantenate multiple parameter values in

Makumbi

Well-Known Member
Licensed User
Please help iam failing to concatenate this
this is my original URL
B4X:
http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx?customerId=702822227&customerId2=077402193&code=256&code2=257
B4X:
Dim j As HttpJob
            j.Initialize("", Me)
                       j.Download("http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx?customerId= " & Oldn.Text & customerId2= " & Newnumber.Text & code= " &Codeolda.Text &code2= & Codenewn.Text )
            Msgbox("Records Uploaded Successfully ", "SMIS")
 

BillMeyer

Well-Known Member
Licensed User
Longtime User
Parameter names are regarded as strings (text) - always enclose them in quotes.

B4X:
j.Download("http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx?customerId= " & Oldn.Text & "customerId2= " & Newnumber.Text & "code= " &Codeolda.Text &"code2=" & Codenewn.Text )
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Try this one:
B4X:
Dim j As HttpJob
j.Initialize("", Me)
j.Download("http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx?customerId=" & Oldn.Text & "&customerId2=" & Newnumber.Text & "&code=" & Codeolda.Text & "&code2=" & Codenewn.Text)
Msgbox("Records Uploaded Successfully ", "SMIS")
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It can be easier to see if you use smart strings:

B4X:
j.Download($"http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx?customerId=${Oldn.Text}&customerId2=${Newnumber.Text}&code=${Codeolda.Text}&code2=${Codenewn.Text}"$ )
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
use parametriced Job. You don´t need to take care about the format.

B4X:
Dim j As HttpJob
            j.Initialize("", Me)
                       j.Download2("http://192.168.1.239/Generic_Handler_JSON/HandlerVBPhonechange.ashx", Array As String("customerId",Oldn.Text,"customerId2", Newnumber.Text,"code", Codeolda.Text,"code2", Codenewn.Text))
 
Upvote 0
Top