错误信息
操作必须使用一个可更新的查询。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。Source Error:
Line 41: objCmd.Connection.Open()
Line 42:
Line 43: objCmd.ExecuteNonQuery()
Line 44: '--显示成功信息
Line 45: Response.Write("<h3>插入数据成功,内容如下:</h3>")
操作必须使用一个可更新的查询。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。Source Error:
Line 41: objCmd.Connection.Open()
Line 42:
Line 43: objCmd.ExecuteNonQuery()
Line 44: '--显示成功信息
Line 45: Response.Write("<h3>插入数据成功,内容如下:</h3>")
ms-help://MS.VSCC/MS.MSDNVS.2052/cpguide/html/cpconmodifyingdataindatabase.htm
将access数据库所在的目录的安全性添加everyone用户,并修改成完全控制,问题就解决了
2.提交表单的form action属性是否有错
3.INSERT语句是否有错strSQL="insert into book(字段名,....) values('" & bno & "','" & bau & "','" & bname & "')"
最好字段名与values相对应,请认真检查