I face an error in my .net application VS2008 with C# Winform. My database Remote Mysql-Cpanel. First time if i connected there s no issue. after connected few minutes laster Fatal error encountered during command execution error occur.if i closed form and reopen its working. After testing so much time i found noting.please help me i am out of option now.i attach the error log if any one have an ans for this type of problem please help me
if (T.ConOpen() == true)
{
Boolean EntryStatus = false;
using (MySqlCommand cmd1 = new MySqlCommand("select * from logindetails", con))
{
using (MySqlDataReader dr1 = cmd1.ExecuteReader())
{
while (dr1.Read())
{
string UserNameTest = T.DecryptDetails(dr1[2].ToString());
string PasswordTest = T.DecryptDetails(dr1[3].ToString());
if ((String.Equals(UserNameTest, UserNameText.Text)) && String.Equals(PasswordTest, PasswordText.Text))
{
ValidationT_MSACCESS.LoginStatus = true;
ValidationT_MSACCESS.Type = T.DecryptDetails(dr1[4].ToString());
ValidationT_MSACCESS.UserNameDetails = T.DecryptDetails(dr1[1].ToString());
EntryStatus = true;
MessageBox.Show("Successfully Login!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
break;
}
}
}
}
Error:
"Fatal error encountered during command execution."
Error code :-2147467259
this is my connection string:
server=xxxx; database=xxxxx_testing; uid=xxxxx_test; pwd=*****;convert zero datetime=True;charset=utf8
please anyone tel me the solution for this problem as soon as possible
What I have tried:
i tried set net_write_timeout=99999
and connection pooling=false