I use VS 2010 and my connector version is 6.4.4
connect in debug mode works fine
but if i install my Projects in other computer
there has a Exception coming
MySql.Data.MySqlException(0x80004005)Reading from the stream has failed→System.IO.EndOfStreamException:
MySql.Data.MySqlClient.MySqlStream.ReadFully
MySql.Data.MySqlClient.MySqlStream.LoadPacket
MySql.Data.MySqlClient.MySqlStream.LoadPacket
MySql.Data.MySqlClient.MySqlStream.ReadPacket
......
and this is my connect code
try
{
MySqlConnection conn = new MySqlConnection("server=servername;user id=myid; password=mypass; database=mydata; pooling=true;charset=utf8;");
conn.Open();
String strSQL = "SELECT * FROM table as A LIMIT 1";
MySqlCommand Sql = new MySqlCommand(strSQL, conn);
MySqlDataReader reader2 = Sql.ExecuteReader();
if (reader2.HasRows)
{
while (reader2.Read())
{
MessageBox.Show(reader2[0].ToString());
}
}
reader2.Close();
conn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
connect in debug mode works fine
but if i install my Projects in other computer
there has a Exception coming
MySql.Data.MySqlException(0x80004005)Reading from the stream has failed→System.IO.EndOfStreamException:
MySql.Data.MySqlClient.MySqlStream.ReadFully
MySql.Data.MySqlClient.MySqlStream.LoadPacket
MySql.Data.MySqlClient.MySqlStream.LoadPacket
MySql.Data.MySqlClient.MySqlStream.ReadPacket
......
and this is my connect code
try
{
MySqlConnection conn = new MySqlConnection("server=servername;user id=myid; password=mypass; database=mydata; pooling=true;charset=utf8;");
conn.Open();
String strSQL = "SELECT * FROM table as A LIMIT 1";
MySqlCommand Sql = new MySqlCommand(strSQL, conn);
MySqlDataReader reader2 = Sql.ExecuteReader();
if (reader2.HasRows)
{
while (reader2.Read())
{
MessageBox.Show(reader2[0].ToString());
}
}
reader2.Close();
conn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}