删除时, 如何提示无记录
TryDim sqlstr As String = "delete from userinfo where 用户编号='" & TextBox7.Text & "'"
Dim comm As SqlCommand = New SqlCommand(sqlstr, cn)
comm.ExecuteNonQuery()
MessageBox.Show("删除成功")
Catch ex As Exception
MessageBox.Show(ex.ToString, "SQL 异常错误!", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
问题:没有记录也会提示删除成功.
请高手帮我修改下,如果没有数据,要出现"无记录"提示框