ASP.NET:accessdb odbc - 当获得异常时,我怎样才能看到完整的堆栈跟踪?

时间:2010-09-14 13:04:12

标签: asp.net ms-access exception odbc

在IIS服务器上使用ASP.NET作为编程语言。 数据库是访问,我使用ODBC连接到数据库。

当我填写网站上的某个表格并按提交时,我得到一个例外:

Server Error in '/' Application.

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. 

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

和堆栈跟踪是:

  site.modGlobal.ExecuteSQL(String sqlStr, OdbcConnection& dbcon) +128
  site.orderprd.imgbtnNextOrder_Click(Object sender, ImageClickEventArgs e) +3951
  System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86
  System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
  System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent      (String eventArgument) +7
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
  System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

这不是我写的网站所以我无法猜测查询的执行位置。 如何获得更完整的堆栈跟踪以确定执行此命令的位置?

1 个答案:

答案 0 :(得分:1)

堆栈跟踪似乎非常明确:

site.modGlobal.ExecuteSQL(String sqlStr, OdbcConnection& dbcon) +128
site.orderprd.imgbtnNextOrder_Click(Object sender, ImageClickEventArgs e) +3951

这些行应该为您提供所需的所有信息。