Sub GetRecord (id As String)
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("check_device", Array(id))
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)
'work with result
req.PrintTable(res)
For Each row() As Object In res.Rows
If row(res.Columns.Get("deviceid")) <> Null Then
Log("Got Device")
End If
If row(res.Columns.Get("deviceid")) = Null Then
Log("Got NO Device")
End If
Next
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub