看看会不会显示我执行了: Dim nms() As String = e.Form.Controls("CheckedComboBox1").text.split(",") '获得接收用户名 Dim cmd As New SQLCommand cmd.ConnectionName = "shenchan" For Each nm As String In nms If nm = "" Then Return End If If nm = User.Name Then MessageBox.Show("不能给自己发信息!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Return End If cmd.CommandText = "Insert Into xinxi (fasong,jieshou,zhuangtai) Values ('" & user.name & "','" & nm & "',0)" cmd.ExecuteNonQuery MessageBox.Show("我执行了!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Next
|