public static IList GetMostPopularExams(int niQueryLimit, bool bFetchFreeOSAdminRelatedOnly) { ISession session = DBFacade.GetCurrentSession(); IQuery query = session.CreateQuery( "select e.Id from Exam e, TestExamination te " + "where te.Exam = e " + (bFetchFreeOSAdminRelatedOnly ? " and ((upper(e.Name) like '%LINUX%') or " + " (upper(e.Name) like '%BSD%')) " : "") + "group by e.Id " + "order by count(te) desc "); query.SetMaxResults(niQueryLimit); IList IDs = query.List(); ArrayList exams = new ArrayList(); foreach (string id in IDs) { exams.Add(LoadById(id)); }; return exams; }
Server Error in '/OnlineExam' Application. --------------------------------------------------------------------------------
in expected: e [select e.Id from Exam e, TestExamination te where te.Exam = e group by e.Id order by count(te) desc ] 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: NHibernate.QueryException: in expected: e [select e.Id from Exam e, TestExamination te where te.Exam = e group by e.Id order by count(te) desc ]
Source Error:
Line 54: { Line 55: Log.Error("Unexpected Exception: ", ex); Line 56: throw ex; Line 57: }; Line 58: }
Source File: c:\OESRakesh\OES\OnlineExam\UserControl\main\leftMenu.ascx.cs Line: 56
Stack Trace:
[QueryException: in expected: e [select e.Id from Exam e, TestExamination te where te.Exam = e group by e.Id order by count(te) desc ]] leftMenu.Page_Load(Object sender, EventArgs e) in c:\OESRakesh\OES\OnlineExam\UserControl\main\leftMenu.ascx.cs:56 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +31 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +68 System.Web.UI.Control.OnLoad(EventArgs e) +88 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Control.LoadRecursive() +158 System.Web.UI.Control.LoadRecursive() +158 System.Web.UI.Control.LoadRecursive() +158 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3037
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|