Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySqlConnection con = new MySqlConnection("server = localhost; database = kurvadb; user = root");
- MySqlCommand com = new MySqlCommand("Select * from client where idpass='" + login.Text + "' and password='"+pass.Password+"'", con);
- con.Open();
- string log = null;
- MySqlDataReader rd = com.ExecuteReader();
- if(rd.HasRows)
- {
- while(rd.Read())
- {
- log = rd.GetString(7);
- }
- }
- if(log!=null)
- {
- MessageBox.Show("Такой пользователь существует");
- }
- else
- {
- MessageBox.Show("Неправильный логин или пароль!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement