Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
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 Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
If FirstTime Then
reqManager.Initialize(Me, "http://myserverip/rdc")
End If
Activity.LoadLayout("frm_main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btn_select_Click
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select_too"
reqManager.ExecuteQuery(cmd, 0, Null) '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)
ToastMessageShow(reqManager.PrintTable(result), True)
End Sub