Android Question Set value into Edit text

eng.khalidvb

Member
Licensed User
Longtime User
Hi All

I have an issue in this code :

Sub btn_check_click


ProgressDialogShow("Wait...")
ExecuteRemoteQuery("select id,name,population from countries where id='" & txt_id.Text & "'",Add_Query )


End Sub


what I want is, how can I set ex id,name,population into Edit text boxes when the query done, I dont want to used the PHP I want other way by coding through the IDE is there any way to do that ...
 

eng.khalidvb

Member
Licensed User
Longtime User
Thanks all

I found now the answer the code is :

Dim name As String
ProgressDialogHide
If Job.Success Then
'ToastMessageShow("Process Done", True)
Dim res As String
res = Job.GetString
Log("Response from server: " & res)
Dim parser As JSONParser
parser.Initialize(res)

Select Job.JobName
Case check_Query
'name = Job.GetString
Dim COUNTRIES As List
COUNTRIES = parser.NextArray 'returns a list with maps
For i = 0 To COUNTRIES.Size - 1
Dim m As Map
m = COUNTRIES.Get(i)

txt_name.text = m.Get("name")
txtpopulation.Text = m.Get("population")
ToastMessageShow("Process Done", True)
Next
End Select
Else
ToastMessageShow("Error: " & Job.ErrorMessage, True)

End If

Job.Release


be useful for all
 
Upvote 0
Top