老师 , 看了下。这种加卸载表,然后 用datasours指定数据源的表 貌似用不上 insert Delete UPDATE
对数据源上的表进行操作,下面的完全可以做到
、在QQClient的ReceivedMessage事件中修改代码:
Dim msg
As
String =
e.Message
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() '重新加载此行
End
If
End
If
ElseIf msg.StartsWith("A#")
Then
'表示增加了行
Dim pts() As
String = msg.Split("#")
If
pts.Length =
3
Then
DataTables(pts(1)).AppendLoad("[_Identify] =
" & pts(2)) '追载新增加的行.
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)) '移除行
End
If
End
If