DoubleClick中代码
Dim cmd As New SQLCommand
Dim exp As String = "(编辑者 Is Null Or 编辑者 = '" & _UserName & "') And [_Identify] = " & e.Row("_Identify")
cmd.CommandText = "Update {打办登记表} Set 编辑者 = '" & _UserName & "' Where " & exp
If cmd.ExecuteNonQuery = 1 Then
Forms("窗口一").Open()
Else
cmd.CommandText = "Select 编辑者 From {打办登记表} Where [_Identify] = " & e.Row("_Identify")
Dim nm As String = cmd.ExecuteScalar
If nm > "" Then
MessageBox.show(nm & "正在编辑此行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
cmd.CommandText = "Select Count(*) From {打办登记表} Where [_Identify] = " & e.Row("_Identify")
If cmd.ExecuteScalar =0 Then
MessageBox.show("此行已被他人删除!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
End If
表名是打办登记表没错,但怎么说数据库找不到这个表呢?
此主题相关图片如下:003.jpg