Sub CreateRequest As DBRequestManager
Dim req As DBRequestManager
req.Initialize(Me, rdcLink)
Return req
End Sub
Sub CreateCommand(Name As String, Parameters() As Object) As DBCommand
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = Name
If Parameters <> Null Then cmd.Parameters = Parameters
Return cmd
End Sub
Sub GetRecord (id As Int)
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_animal", 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)
'i handle it with a for each loop. In this loop, it is easy to add the result for example to a sqlite database.
dim theresultinstring as string
For Each content1() As Object In res.Rows
theresultinstring = content1(res.Columns.Get("id")) '"id" here you put the column name from the item from the result with the column name from your online database.
Next
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub