Discuz!NT官方社区

首页 » Discuz!NT交流与讨论 » BUG 反馈 » “我的主题”“我的帖子”功能出错
ccone - 2008-1-13 22:54:00
“/”应用程序中的服务器错误。 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY `tid` DESC' at line 1 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY `tid` DESC' at line 1

源错误:

生成此未处理异常的源代码只能在调试模式中进行编译时显示。若要启用该功能,请执行以下步骤之一,然后请求 URL:

1. 在生成错误的文件的顶部添加一个“Debug=true”指令。示例:

  <%@ Page Language="C#" Debug="true" %>

或者:

2. 将以下节添加到应用程序的配置文件中:

<configuration>
  <system.web>
      <compilation debug="true"/>
  </system.web>
</configuration>

请注意,第二种方法将使给定应用程序中的所有文件在调试模式下进行编译。第一种方法只使特定文件在调试模式下进行编译。

重要事项:以调试模式运行应用程序肯定会引起内存/性能系统开销。在部署到产品方案中之前,应该确保应用程序已禁用调试。

堆栈跟踪:

[MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY `tid` DESC' at line 1]  MySql.Data.MySqlClient.PacketReader.CheckForError() +156  MySql.Data.MySqlClient.PacketReader.ReadHeader() +229  MySql.Data.MySqlClient.PacketReader.OpenPacket() +107  MySql.Data.MySqlClient.NativeDriver.ReadResult(Int64& affectedRows, Int64& lastInsertId) +17  MySql.Data.MySqlClient.CommandResult.ReadNextResult(Boolean isFirst) +57  MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume) +128  MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet(MySqlDataReader reader) +394  MySql.Data.MySqlClient.MySqlDataReader.NextResult() +287  MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +180  MySql.Data.MySqlClient.MySqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5  Discuz.Data.DbHelper.ExecuteReader(IDbConnection connection, IDbTransaction transaction, CommandType commandType, String commandText, IDataParameter[] commandParameters, IDbConnectionOwnership connectionOwnership) +460  Discuz.Data.DbHelper.ExecuteReader(CommandType commandType, String commandText, IDataParameter[] commandParameters) +280  Discuz.Data.DbHelper.ExecuteReader(CommandType commandType, String commandText) +6  Discuz.Data.MySql.DataProvider.GetTopicsByUserId(Int32 userId, Int32 pageIndex, Int32 pageSize) +1033  Discuz.Forum.Topics.GetTopicsByUserId(Int32 userId, Int32 pageIndex, Int32 pageSize, Int32 newmin, Int32 hot) +85  Discuz.ForumPage.mytopics.ShowPage() +266  Discuz.Web.UI.Pages.BasePage..ctor() +4230  Discuz.ForumPage.mytopics..ctor() +50  _ASP.mytopics_aspx..ctor() +6[TargetInvocationException: 调用的目标发生了异常。]  System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0  System.Activator.CreateInstance(Type type, Boolean nonPublic) +65  System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +164[HttpException (0x80004005): 未能创建类型为“_ASP.mytopics_aspx”的页。]  System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +340  System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) +43  System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +44  System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +695  System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +95  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173



版主和高手们看看是怎么回事啊!谢谢了!
旭雨 - 2008-1-16 9:19:00
我测试了没有什么问题,请您说说您的操作步骤!
1
查看完整版本: “我的主题”“我的帖子”功能出错