How i can call jrdc2 with wait for
i try this but dont work.
Thanks.
i try this but dont work.
B4X:
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select"
cmd.Parameters = Array()
Dim ser As B4XSerializator
Dim data() As Byte = ser.ConvertObjectToBytes(CreateMap("command": cmd, "limit": 0, "version": 2))
Private j As HttpJob
Try
j.Initialize("",Me)
j.PostBytes(rdcLink & "?method=query2" , data)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim data() As Byte = Bit.InputStreamToBytes(j.GetInputStream)
Dim res As DBResult = ser.ConvertBytesToObject(data)
Return res
Else
End If
Catch
End Try
If j.IsInitialized Then j.Release
Return res
Thanks.