Server Error in '/' Application.

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 'default'' at line 1

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: 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 'default'' at line 1

Source Error:


Line 76:     if(ActionId == "3") {
Line 77:         /* First Choice - Title from CMS */
Line 78:         var DCSLanding = CMS.GetDCS(DeptCode, ClassCode, SubclassCode);
Line 79:         if(DCSLanding != null) {
Line 80:             Title = DCSLanding.PageTitle != null ? DCSLanding.PageTitle : null;

Source File: c:\inetpub\wwwroot\_PageStart.cshtml    Line: 78

Stack Trace:


[MySqlException (0x80004005): 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 'default'' at line 1]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +272
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +68
   MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) +17
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +110
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +783
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1565
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.ExecuteReader() +14
   WebMatrix.Data.<QueryInternal>d__0.MoveNext() +153
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +121
   WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +98
   ASP.CMS.Single(String SQLSelect, String Token) +73
   ASP.CMS.GetIdByTitle(String Title, String ParentId) +1332
   ASP.CMS.GetDCS(String DeptCode, String ClassCode, String SubclassCode) +1458
   ASP._Page__PageStart_cshtml.Execute() in c:\inetpub\wwwroot\_PageStart.cshtml:78
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +46
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116


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