Click here to Skip to main content
16,011,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
C#
if (T.ConOpen() == true)
                    {
                        Boolean EntryStatus = false;
                        using (MySqlCommand cmd1 = new MySqlCommand("select * from logindetails", con))
                        {
                            using (MySqlDataReader dr1 = cmd1.ExecuteReader()) // Error Occured Here
                            {
                                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
Posted
Updated 12-May-16 2:25am
Comments
Richard Deeming 12-May-16 10:23am    
Looks like you're storing passwords using reversible encryption. That's almost as bad as storing them in plain text!

You should only ever store a salted hash of the user's password:
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

1 solution

See 80004005 - Google Search[^], and check what is happening on the server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900