这样测试看看
Dim drr As DataRow = DataTables("信息").AddNew
drr("发送者") = iif(e.UserName > "",e.UserName,"服务器")
drr("时间") = Date.Now()
drr("信息") = e.Message
Dim msg As String = e.Message
Dim pts() As String = msg.Split("#")
Dim a As String = pts(2)
If msg.StartsWith("U#") Then '表示修改了某行
'Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
MessageBox.show(1)
Dim dr As DataRow = DataTables(pts(1)).Find("[_Identify] = " & a )
MessageBox.show(2)
If dr IsNot Nothing Then
dr.Load()
End If
MessageBox.show(3)
End If
ElseIf msg.StartsWith("A#") Then '表示增加了行
'Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
MessageBox.show(4)
DataTables(pts(1)).RemoveFor("[_Identify] =" & a)
DataTables(pts(1)).AppendLoad("[_Identify] =" & a) '追载新增加的行.
MessageBox.show(5)
End If
ElseIf msg.StartsWith("D#") Then '表示删除了行
'Dim pts() As String = msg.Split("#")
If pts.Length = 3 Then
DataTables(pts(1)).RemoveFor("[_Identify] =" & a) '移除行
End If
End If