Thanks DonManfred, I moved the DBresult and DBcommand from Starter to Main and it resolved the error. Now I have a condition where the response is not correct or not happening. I added the code and modified it for my case:
I step through the code and it reaches he "Wait for" line but then it ends and never reaches the j.Success if statement.
I saw the command reach the jDRC2 module and respond (It should be a no record found response) but I don't know whats happening.
jDRC2 Log:
Command: query: sel_chk_id, took: 13ms, client=192.168.1.114
Command: query: sel_chk_id, took: 228903ms, client=192.168.1.114
This second entry was when I was stepping through the code...
B4X:
Sub GetChkOutId
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("sel_chk_id", Array(gtrndate, groute))
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
ckid = 1
'work with result
req.PrintTable(res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
I step through the code and it reaches he "Wait for" line but then it ends and never reaches the j.Success if statement.
I saw the command reach the jDRC2 module and respond (It should be a no record found response) but I don't know whats happening.
jDRC2 Log:
Command: query: sel_chk_id, took: 13ms, client=192.168.1.114
Command: query: sel_chk_id, took: 228903ms, client=192.168.1.114
This second entry was when I was stepping through the code...