各位老师,
此主题相关图片如下:qq截图20120828193204.jpg
在项目中增加了一个“用户”表然后用帮助中的自定义用户管理权限中的代码,发现一个问题,当在删除用户时“用户”表中的用户不能立即删除,必须要等到重新打开项目时删除的用户才会消失,删除按钮的代码如下:
Dim lst As WinForm.ListBox = e.Form.Controls("ListBox1")
If lst.SelectedIndex >=0 Then
Dim UserName As String = lst.SelectedItem
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "Delete From {用户} Where [Name] = '" & UserName & "'"
cmd.ExecuteNonQuery
lst.Items.RemoveAt(lst.SelectedIndex)
lst.Select()
End If
是不是我的SQL语句哪里有错误?
谢谢!