Unhandled Exception: System.Typeinitializationexception

Asked

Viewed 85 times

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();

When debugging it the following error: Unhandled Exception:

System.Typeinitializationexception: The type initializer for 'Mysql.Data.Mysqlclient.Replication.Replicationmanager' threw an Exception.

I don’t know if it’s because I’m using phpMyAdmin to manage the database.

The DLL I use is from the official Mysql website

  • Which line of error?

  • A guy solved a problem like this one: https://github.com/alvyxaz/barebones-masterserver/issues/68 Get help here

  • Error here 'sqlconn. Open();'

  • What is the Inner Exception?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.