ошибка pixs.ru/showimage/tGUIRNSoqc_4801605_29762834.jpg[/IMG] код SqlConnection cn = new SqlConnection("Data Source=(local);Initial Catalog=login1;Integrated Security=True"); cn.Open(); SqlCommand cmd = new SqlCommand("select * from user1 where username = '" +textBox1.Text+ "' and password = '" +textBox2.Text+ "'", cn); SqlDataReader dr; dr = cmd.ExecuteReader () ; int count = 0; while (dr.Read()) { count += 1; } if (count == 1) { MessageBox.Show("Успешно вошли"); Form3 f3 = new Form3(); f3.Show(); } else if (count >0) { MessageBox.Show ("дубликат"); } else { MessageBox.Show("Логин или пароль введен не правильно"); } textBox1.Clear(); textBox2.Clear(); Code SqlConnection cn = new SqlConnection("Data Source=(local);Initial Catalog=login1;Integrated Security=True"); cn.Open(); SqlCommand cmd = new SqlCommand("select * from user1 where username = '" +textBox1.Text+ "' and password = '" +textBox2.Text+ "'", cn); SqlDataReader dr; dr = cmd.ExecuteReader () ; int count = 0; while (dr.Read()) { count += 1; } if (count == 1) { MessageBox.Show("Успешно вошли"); Form3 f3 = new Form3(); f3.Show(); } else if (count >0) { MessageBox.Show ("дубликат"); } else { MessageBox.Show("Логин или пароль введен не правильно"); } textBox1.Clear(); textBox2.Clear();