Hi,
I am using jRDC client modules.
If I define my request function and the associated variables in the main app module it works. If I place it in another code module it doesn't.
Why is this?>
Best regards
Rob
I am using jRDC client modules.
If I define my request function and the associated variables in the main app module it works. If I place it in another code module it doesn't.
Why is this?>
B4X:
'Network Variables
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.1.114:17178/rdc"
Sub getPowerDataForDisplayUpdate
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand
If initFlag Then
' Get full data set from database for historical records and latest
cmd = CreateCommand("getPwrDataWithAlarms_Raw_N7200_Ascn", Null)
Else
'Get the lastest single record for the update
cmd = CreateCommand("getPwrDataWithAlarmsLast_0001", Null)
End If
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)
getRecords (res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
Best regards
Rob