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 'order by league_name' 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 'order by league_name' at line 1

Source Error:


Line 255:        MyLB.MyConn.Open();
Line 256:        MySqlCommand cmd = new MySqlCommand(sqltext, MyLB.MyConn);
Line 257:        MySqlDataReader reader2 = cmd.ExecuteReader();
Line 258:        DropDownList1.DataSource = reader2;
Line 259:        DropDownList1.AppendDataBoundItems = true;

Source File: g:\pleskvhosts\thefantasyadvisors.com\httpdocs\vip\Leagues\Default.aspx.cs    Line: 257

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 'order by league_name' at line 1]
   MySql.Data.MySqlClient.MySqlStream.OpenPacket() +239
   MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) +62
   MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() +48
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +524
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +815
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   vip_Leagues_Rules.FillLeagues(String UID) in g:\pleskvhosts\thefantasyadvisors.com\httpdocs\vip\Leagues\Default.aspx.cs:257
   vip_Leagues_Rules.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\thefantasyadvisors.com\httpdocs\vip\Leagues\Default.aspx.cs:28
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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