Hallo!
I need a real-time reflection of changing in the database. Below is my code example.
It is not working properly. What's the matter?
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Timer1.Tick
SVal = SVal + 1
EVal = EVal + 1
RVal = Rnd()
NVal = 10 * RVal
Me.NTableAdapter1.Insert(SVal, 0, EVal, NVal)
'database update
If NVal = 10 Then
Timer1.Enabled = False
Me.Chart1.DataBind() 'refresh Chart1?
Else
If TmrVal = 10 Then
TmrVal = 0
Me.Chart1.DataBind() 'refresh Chart1?
End If
End If
End Sub