Hi, I'm trying to extract the response of a query but I'm unable to get a valid value.
B4X:
Dim cnt As Int = 0
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand
cmd = CreateCommand("sel_chk_id", Array(gtrndate, gdriver))
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(h As HttpJob)
If h.Success Then
req.HandleJobAsync(h, "req")
Wait For (req) req_Result(res As DBResult)
cnt = res.Rows.Size
req.PrintTable(res)
If cnt > 0 Then
Dim Value As Int = res.Columns.Get("CheckOutId") ' This value is 1 in the DB
ckid = Value ' but it returns value zero
Else
addNewChkOut
End If
Log("ckid1:" & ckid)
Else
Log("ERROR: " & h.ErrorMessage)
End If
h.Release