Problem with getting result from database

Jamsa

Member
Licensed User
Longtime User
I trying to get data from my database using HttpUtils.

I've got the basic working without issues. Yay.

But when I try to integrate it into my project, it doesn't work no matter what I try.:BangHead:

I can send the query fine as the last HttpUtils log msg is "Starting Job: POST AppInfo"

But I don't get a result back for some reason.

I've tried using a timer to give time for the server to respond, but it doesn't help(, or I'm doing it wrong)

I got the code in a code module called Classification:

B4X:
Sub Process_Globals
...
   MainUrl = "http://www.emzla.dk/test.php"
   
   
   HttpUtils.CallbackActivity = "Classification"
   HttpUtils.CallbackJobDoneSub = "JobDone"
...
End Sub

Sub JobDone (Job As String)
   Select Job
      Case "POST AppInfo"
         Log("JobDone...POST AppInfo")
         If HttpUtils.IsSuccess(MainUrl) Then
            Log(HttpUtils.GetString(MainUrl))
         End If
      Case "POST AppList"
         Log("JobDone...POST AppList")
         If HttpUtils.IsSuccess(MainUrl) Then
            Log(HttpUtils.GetString(MainUrl))
         End If
         GetAppDataOnPhone
   End Select
   HttpUtils.Complete = False 'Turn off the complete flag so we won't handle it again if the activity is resumed.
End Sub

Futher down(same module) I start the "db action":

B4X:
Sub GetListOfAppInfo
   ProgressDialogShow("Fetching data...")
   HttpUtils.PostString("POST AppInfo", MainUrl, "SELECT * FROM AppList")
End Sub

The function GetAppDataOnPhone uses the data from the db, but since nothing has come back, no data gets worked.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…