Server Error in '/' Application.

Expected end of data packet

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: Expected end of data packet

Source Error:


Line 25:         con.Open();
Line 26:         MySqlDataAdapter _da = new MySqlDataAdapter(query, con);
Line 27:         _da.Fill(ds);
Line 28:         con.Close();
Line 29: 

Source File: d:\inetpub\vhosts\catrobotics.in\httpdocs\precision_handling.aspx.cs    Line: 27

Stack Trace:


[MySqlException (0x80004005): Expected end of data packet]
   MySql.Data.MySqlClient.NativeDriver.CheckEOF() +170
   MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns) +76
   MySql.Data.MySqlClient.Driver.GetColumns(Int32 count) +114
   MySql.Data.MySqlClient.ResultSet.LoadColumns(Int32 numCols) +29
   MySql.Data.MySqlClient.ResultSet..ctor(Driver d, Int32 statementId, Int32 numCols) +60
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +176
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +435

[MySqlException (0x80004005): Fatal error encountered attempting to read the resultset.]
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1018
   MySql.Data.MySqlClient.MySqlDataReader.Close() +474
   MySql.Data.MySqlClient.MySqlCommand.ResetReader() +50
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +2449
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +214
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +180
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +126
   press_handling.BindImage() in d:\inetpub\vhosts\catrobotics.in\httpdocs\precision_handling.aspx.cs:27
   press_handling.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\catrobotics.in\httpdocs\precision_handling.aspx.cs:16
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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