string strSql="UPDATE reference SET hit=hit+1 WHERE id="+i;
2、错误提示如下:
System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。 at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object&
executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at DDRS.FaqDetail.UpdateHit(Int32 i) in
d:\wwwroot\LG_vrd\FaqDetail.aspx.cs:line 64
3、故障原因:数据库没有给足相应权限
4、解决办法:开放读写权限,如下图所示
A、开放权限前:
B、开放权限后: