Hello Community !
I want to access 2 different instances on a server with ONE app.
I am running 2 x jRDC2 servers which access the different instances.
Obviously you need 2 dbrequestmanagers so that you can use 2 diffe-
rent connectionstrings. (instances are accessed via port) Something like that:
But how do I handle the jobdone event:
Thank you very much in advance.
Regards
h725
I want to access 2 different instances on a server with ONE app.
I am running 2 x jRDC2 servers which access the different instances.
Obviously you need 2 dbrequestmanagers so that you can use 2 diffe-
rent connectionstrings. (instances are accessed via port) Something like that:
B4X:
Sub Process_Globals
Private reqManager As DBRequestManager
Private reqManager2 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.6:17178/rdc")
reqManager2.Initialize(Me, "http://192.168.0.6:17179/rdc")
EndIf
Activity.LoadLayout("1")
End Sub
B4X:
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
Thank you very much in advance.
Regards
h725