Unhandled Exception: System.TypeInitializationException

0
MySqlConnection sqlconn;
            string connsqlstring = "server=localhost;user id=sql10217362;persistsecurityinfo=True;database=sql10217362 --debug";
            sqlconn = new MySqlConnection(connsqlstring);
            sqlconn.Open();
            string queryString = "SELECT * from users where usuario='"+ txtUser.Text + "' and senha = '" + txtPass.Text + "';'";
            MySqlCommand cmd = new MySqlCommand(queryString,sqlconn);
            MySqlDataReader leitor = cmd.ExecuteReader();

At the time of debugging it gives the following error: Unhandled Exception:

  

System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception.

I do not know if it's because I'm using phpMyAdmin to administer the database.

The DLL I use is from the official MySql site

    
asked by anonymous 25.01.2018 / 16:44

0 answers