定期刷新数据
If DataTables("日程明细").Compute("max(_Identify)") > 0 Then
Vars("lastrow") = DataTables("日程明细").Compute("max(_Identify)") ‘ Vars("lastrow") 记录上一次的加载行数
End If
'重新加载
DataTables("日程明细").LoadFilter =""
DataTables("日程明细").Load
后边在 QQ客户端 receivedmessage
If msg.StartsWith("U#") Then '表示修改了某行
Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
Dim dr As DataRow = DataTables(pts(1)).Find("[_Identify] = " & pts(2))
If dr IsNot Nothing Then
dr.Load() '重新加载此行
If pts(1) = "日程明细" Then
Functions.Execute("日程刷新")
End If
End If
End If
ElseIf msg.StartsWith("A#") Then '表示增加了行
Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
If DataTables(pts(1)).Compute("max(_identify)") < pts(2) Then
DataTables(pts(1)).AppendLoad("[_Identify] = " & pts(2)) '追载新增加的行.
End If
If pts(1) = "日程明细" Then
Functions.Execute("日程刷新")
End If
End If
ElseIf msg.StartsWith("D#") Then '表示删除了行
Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
DataTables(pts(1)).RemoveFor("[_Identify] = " & pts(2)) '移除行
If pts(1) = "日程明细" Then
Functions.Execute("日程刷新")
End If
End If
End If
后 ,
上边的定时刷新数据就开始 时不时报错了