bollanog
Member
Hello good night, I have used the following code in my b4a application.
From the following address, https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/ and everything has been excellent with the connection to the b4j server, but the server hangs when there are several requests.
Is there a way instead of using b4j or creating a server for visual studio c #?
B4X:
Sub Process_Globals
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
Private const rdcLink As String = "http://192.168.0.6:17178/rdc"
End Sub
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)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
From the following address, https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/ and everything has been excellent with the connection to the b4j server, but the server hangs when there are several requests.
Is there a way instead of using b4j or creating a server for visual studio c #?