Hi guys,
I am new to b4a tool.
I am developing an app, where I want to just fetch data from sql and populate in a list. I have asp.net service which runs fine.
I searched many things here on the forum but unfortunately i didnt found any thread which can help me bind data. (I saw a thread showing hardcode bind of text and image). But i need to bind 'sql table columns'.
Please help me just how to bind fetched data to listView ??
any piece of code regarding FOR loop/cursor/while loop ???
call a webservice and perform queries.. handle the result in jobdone event
B4X:
Dim job1 As HttpJob
job1.Initialize("Fill", Me)
job1.Download2("https://home/yourwebservice.php")
ProgressDialogShow2("Fetching Data...",False)
and fill your list/listview when the jobdone is raised
B4X:
Sub JobDone (Job As HttpJob)
ProgressDialogHide
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Fill"
Dim strReturn As String
strReturn = Job.Getstring
log(strReturn) '<-- result.. can be a string, array, or object
End Select
End Sub