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 520:		MySqlDataAdapter da = new MySqlDataAdapter(sqlQuery, baglanti);
Line 521:		DataTable dt = new DataTable();
Line 522:		da.Fill(dt);
Line 523:
Line 524:		return dt;

Source File: c:\inetpub\vhosts\eranmuhendislik.com.tr\httpdocs\App_Code\sayfa.cs    Line: 522

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() +191
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) +68
   MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) +17
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +100
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +439
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1282
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +111
   sayfa.getdt(String table, String command) in c:\inetpub\vhosts\eranmuhendislik.com.tr\httpdocs\App_Code\sayfa.cs:522
   Default2.belgeler() in c:\inetpub\vhosts\eranmuhendislik.com.tr\httpdocs\bitirme-belgeleri.aspx.cs:20
   Default2.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\eranmuhendislik.com.tr\httpdocs\bitirme-belgeleri.aspx.cs:13
   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