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

Source Error:


Line 27:             con.Open();
Line 28:             cmd.CommandText = com;
Line 29:             dr = cmd.ExecuteReader();
Line 30:         //}
Line 31:         //catch (Exception)

Source File: d:\inetpub\vhosts\urduscience.org\httpdocs\App_Code\dbtrans.cs    Line: 29

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 '' at line 1]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +309
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +67
   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() +931
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1631
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   dbtrans.readerFunc(String com) in d:\inetpub\vhosts\urduscience.org\httpdocs\App_Code\dbtrans.cs:29
   dbtrans.getDataAsTable(String sqlcommand) in d:\inetpub\vhosts\urduscience.org\httpdocs\App_Code\dbtrans.cs:58
   article.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\urduscience.org\httpdocs\article.aspx.cs:19
   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