Server Error in '/' Application.

Expression #1 of ORDER BY clause is not in SELECT list, references column 'zpc.articles.Date' which is not in SELECT list; this is incompatible with DISTINCT

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: MySql.Data.MySqlClient.MySqlException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'zpc.articles.Date' which is not in SELECT list; this is incompatible with DISTINCT

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:


[MySqlException (0x80004005): Expression #1 of ORDER BY clause is not in SELECT list, references column 'zpc.articles.Date' which is not in SELECT list; this is incompatible with DISTINCT]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +343
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +380
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +116
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1042
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +2371
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +201
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +178
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +122
   Gloo.Database.MySql.GetDataSet(MySqlCommand Cmd) in C:\Repos\ZPC\Framework\Database\MySql.cs:119
   Gloo.Database.MySql.GetDataSet(String Sql) in C:\Repos\ZPC\Framework\Database\MySql.cs:99
   Gloo.Database.DbUtilities.GetDataSet(String Sql) in C:\Repos\ZPC\Framework\Database\DbUtilities.cs:98
   Gloo.DataAccess.GlooArticleDAL.GetMonths() in C:\Repos\ZPC\Framework\Data Access\GlooArticleDAL.cs:169
   Gloo.BusinessLogic.GlooArticle.GetMonths() in C:\Repos\ZPC\Framework\Business Logic\GlooArticle.cs:244
   Gloo.Website.Web.Pages.Articles.BuildArchiveFilter() in C:\Repos\ZPC\Website\Web\Pages\Articles.aspx.cs:294
   Gloo.Website.Web.Pages.Articles.Page_Load(Object sender, EventArgs e) in C:\Repos\ZPC\Website\Web\Pages\Articles.aspx.cs:51
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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