Server Error in '/' Application.

在应使用条件的上下文(在 'i' 附近)中指定了非布尔类型的表达式。

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.

Exception Details: System.Data.SqlClient.SqlException: 在应使用条件的上下文(在 'i' 附近)中指定了非布尔类型的表达式。

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): 在应使用条件的上下文(在 'i' 附近)中指定了非布尔类型的表达式。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1767866
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5352418
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +244
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1691
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
   System.Data.SqlClient.SqlDataReader.get_MetaData() +90
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +365
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +1406
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +177
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53
   System.Data.SqlClient.SqlCommand.ExecuteScalar() +149
   Kesion.DataBase.DBHelper.GetPageSql(String SqlAllFields, String SqlTablesAndWhere, String IndexField, String OrderFields, Int32 PageIndex, Int32 PageSize, Int32& RecordCount, Int32& PageCount) +205
   Kesion.SqlDAL.DataFactory.GetPage(String SqlAllFields, String SqlTablesAndWhere, String IndexField, String OrderFields, Int32 PageIndex, Int32 PageSize, Int32& RecordCount, Int32& PageCount) +77
   Kesion.BLL.DataFactory.GetPage(String SqlAllFields, String SqlTablesAndWhere, String IndexField, String OrderFields, Int32 PageIndex, Int32 PageSize, Int32& RecordCount, Int32& PageCount) +159
   Kesion.NET.WebSite.Course.Course_List.FRcnGMQhfa(String& ) +2747
   Kesion.NET.WebSite.Course.Course_List.Page_Load(Object sender, EventArgs e) +1189
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408