“/”应用程序中的服务器错误。

操作必须使用一个可更新的查询。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。

源错误:


行 95:         {
行 96:             //增加点击数
行 97:             MojoCube.Web.Sql.AddClicks("Product_List", "pk_Product=" + dtMain.Rows[0]["pk_Product"].ToString(), int.Parse(dtMain.Rows[0]["Clicks"].ToString()));
行 98: 
行 99:             ViewState["pk_Product"] = dtMain.Rows[0]["pk_Product"].ToString();

源文件: d:\netTemplateV1\netTemplateV1\pc_8010\Access\ProductDetail.aspx.cs    行: 97

堆栈跟踪:


[OleDbException (0x80004005): 操作必须使用一个可更新的查询。]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1232696
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +208
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +162
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +107
   MojoCube.Web.Sql.AddClicks(String tableName, String where, Int32 clicks) in G:\McCMS\McCMS_Company_V5\Libs\MojoCube.Web\Sql.cs:148
   ProductDetail.CreateContent() in d:\netTemplateV1\netTemplateV1\pc_8010\Access\ProductDetail.aspx.cs:97
   ProductDetail.Page_Load(Object sender, EventArgs e) in d:\netTemplateV1\netTemplateV1\pc_8010\Access\ProductDetail.aspx.cs:68
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3770.0