Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private reqManager As DBRequestManager
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
Private btnSelect As Button
End Sub
Sub AppStart (Form1 As Form, Args() As String)
reqManager.Initialize(Me, "10.211.55.4/rdc")
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
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)
reqManager.PrintTable(result)
End Sub
Sub btnSelect_Action
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "RDC_Test"
Log(cmd)
reqManager.ExecuteQuery(cmd, 0, Null)
End Sub