Public Sub GetRecord (Command As String, parameters() As String) As ResumableSub
Dim Answer As Map
Answer.Initialize
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand(Command, parameters)
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
Answer.Put("Success", j.Success)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(Res As DBResult)
'work with result
req.PrintTable(Res)
Answer.Put("Message","Data have been read successfully")
Else
Log("ERROR: " & j.ErrorMessage)
Answer.Put("Error", j.ErrorMessage)
End If
j.Release
Answer.Put("Data",Res) '''OJO ESTO DEBERÍA ESTAR DENTRO EL j.Success... COMPROBARLO
'req.PrintTable(Res)
Return Answer
End Sub