Hi
I am a bit puzzled ,why in ABM 4.03 when i work with a timer update some values in the
CustomGauges i will get Jetty timeouts after a while .
It worked before in a earlier version of ABM for about more then 2 year no problem.
The timer just calls the Mysql and updates the gauge value and refreshes the gauge. I rewrote the app 6 times different
ways now without luck.
Everything works perfect without a timer , i can press 1000 times the reload page does not loose the connection .
I am missing something .....
Any one had something like this ?
here is the code
thanks AH
I am a bit puzzled ,why in ABM 4.03 when i work with a timer update some values in the
CustomGauges i will get Jetty timeouts after a while .
It worked before in a earlier version of ABM for about more then 2 year no problem.
The timer just calls the Mysql and updates the gauge value and refreshes the gauge. I rewrote the app 6 times different
ways now without luck.
Everything works perfect without a timer , i can press 1000 times the reload page does not loose the connection .
I am missing something .....
Any one had something like this ?
here is the code
B4X:
Sub timerx_Tick
loadusersx
End Sub
Sub loadusersx
timerx.Enabled=False
Dim SQLCOMP As SQL = DBM.GetSQL
Dim users As List=DBM.SQLSelect(SQLCOMP, sb, Null)
For i = 0 To users.Size-1
Dim userx As Map= users.Get(i)
Dim xx As String=userx.Get("servidn")
Dim x1 As Double=userx.Get("totali")
Dim x2 As Int=userx.Get("totalu")
If xx.EndsWith("90") Then
custGauge1.myValue = x2
custGauge1.maxval = x1
custGauge1.ABMComp.Refresh
Else If xx.EndsWith("91") Then
custGauge2.myValue = x2
custGauge2.maxval = x1
custGauge2.ABMComp.Refresh
Else If xx.EndsWith("92") Then
custGauge3.myValue = x2
custGauge3.maxval = x1
custGauge3.ABMComp.Refresh
Else If xx.EndsWith("93") Then
custGauge4.myValue = x2
custGauge4.maxval = x1
custGauge4.ABMComp.Refresh
Else If xx.EndsWith("95") Then
custGauge5.myValue = x2
custGauge5.maxval = x1
custGauge5.ABMComp.Refresh
Else If xx.EndsWith("68") Then
custGauge6.myValue = x2
custGauge6.maxval = x1
custGauge6.ABMComp.Refresh
Else If xx.EndsWith("09") Then
custGauge7.myValue = x2
custGauge7.maxval = x1
custGauge7.ABMComp.Refresh
End If
Next
DBM.CloseSQL(SQLCOMP)
timerx.Enabled=True
page.Refresh
End Sub
thanks AH