Sub Process_Globals
Dim reqManager As DBRequestManager
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
'reqManager.Initialize(Me, "http://192.168.0.100:1")
reqManager.Initialize(Me, "http://<myIPAddress>:3013/rdc")
End If
End Sub
Sub Activity_Click
GetAnimal("1")
End Sub
Sub GetAnimal(Name As String)
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select_animal"
cmd.Parameters = Array As Object(Name)
reqManager.ExecuteQuery(cmd, 0, Null)
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Log("Error: " & Job.ErrorMessage)
Else
If Job.JobName = "DBRequest" Then
reqManager.HandleJobAsync(Job, "ReqManager")
End If
End If
Job.Release
End Sub
Sub ReqManager_Result(result As DBResult)
'work with result
End Sub