Dim r As Row = Tables("派工").Current If r IsNot Nothing Then Dim p As String = IIF(r.DataRow.RowState = DataRowState.Added, "A#", "U#") r.Save() '一定要在保存后合成信息,因为新增行的主键在保存后才生成 Dim msg As String = p & "派工" & "#" & r("_Identify") For Each bd As QQBuddy In QQClient.Buddies If bd.Online Then msgbox(bd.name) QQClient.Send(bd.name, msg) End If Next End If