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

关键字 'ORDER' 附近有语法错误。
该游标未声明。
sp_cursorfetch: 所提供的游标标识符值(0)无效。
sp_cursorclose: 所提供的游标标识符值(0)无效。

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

异常详细信息: System.Data.SqlClient.SqlException: 关键字 'ORDER' 附近有语法错误。
该游标未声明。
sp_cursorfetch: 所提供的游标标识符值(0)无效。
sp_cursorclose: 所提供的游标标识符值(0)无效。

源错误:


行 38: 
行 39:         //加载列表
行 40:         Model.PageData<Model.Product> data = new BLL.Product().GetList(12, base.PageIndex, "ispass=1 and type=" + clID, "sort asc,AddTime desc");
行 41:         pgServer.UrlRewritePattern = "/product/Default=%clID%-{0}.htm";
行 42:         

源文件: f:\usr\localuser\hgw028110\product\Default.aspx.cs    行: 40

堆栈跟踪:


[SqlException (0x80131904): 关键字 'ORDER' 附近有语法错误。
该游标未声明。
sp_cursorfetch: 所提供的游标标识符值(0)无效。
sp_cursorclose: 所提供的游标标识符值(0)无效。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1960442
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4890639
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2412
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +293
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +130
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
   Maticsoft.DBUtility.DbHelperSQL.RunProcedure(String storedProcName, IDataParameter[] parameters, String tableName) in E:\个人项目\Importedfood\DBUtility\DbHelperSQL.cs:926
   DAL.Product.GetList(Int32 PageSize, Int32 PageIndex, String strWhere, String filedOrder) in E:\张锁英\work\201206\201205_梦江南服饰\DAL\Product.cs:53
   BLL.Product.GetList(Int32 PageSize, Int32 PageIndex, String strWhere, String sort) in E:\张锁英\work\201206\201205_梦江南服饰\BLL\Product.cs:133
   webUI_product_Default.loadNews() in f:\usr\localuser\hgw028110\product\Default.aspx.cs:40
   webUI_product_Default.Page_Load(Object sender, EventArgs e) in f:\usr\localuser\hgw028110\product\Default.aspx.cs:32
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.5485; ASP.NET 版本:2.0.50727.5491