title: The "Check Availability" username button still recognized as exists, while the database the username is not exists
body: <p>How do i prevent a button to continue when there are an errors appears?</p>
  
  <p>I already can check the availability of username in database, but even though the username is not exists in the database, the "Check Availability" button still recognized it as exists.</p>
  
  <p>Here is the screenshots: 
  <img src="https://i.stack.imgur.com/8JssS.png" alt="enter image description here"></p>
  
  <p>Image above show the username "Seranne" already exists, but in the database, Seranne is not exists.</p>
  
  <p><img src="https://i.stack.imgur.com/dedJJ.png" alt="enter image description here"></p>
  
  <p>Here is the code:</p>
  
  <pre><code>else if (textBox1.Text.Length &gt; 0 &amp;&amp; textBox2.Text == textBox3.Text)
              {
                  label5.Visible = false;
                  label7.Visible = false;
  
                  conn.Open();
  
                  CheckUsername();
  
                  if (CheckUsername() == false)
                  {
                      return;
                  }
  
                  cmd.CommandText = "INSERT INTO [Member] ([Username], [Password], [UserType]) VALUES (@Username, @Password, @UserType)";
  
                  cmd.Parameters.Add("Username", System.Data.OleDb.OleDbType.VarChar);
                  cmd.Parameters["Username"].Value = this.textBox1.Text;
  
                  cmd.Parameters.Add("Password", System.Data.OleDb.OleDbType.VarChar);
                  cmd.Parameters["Password"].Value = this.textBox2.Text;
  
                  cmd.Parameters.Add("UserType", System.Data.OleDb.OleDbType.VarChar);
                  cmd.Parameters["UserType"].Value = this.comboBox1.Text;
  
                  int numberOfRows = cmd.ExecuteNonQuery();
  
                  conn.Close();
  
                  System.Media.SoundPlayer sound = new System.Media.SoundPlayer(@"C:\Windows\Media\Windows Notify.wav");
                  sound.Play();
                  var dialogresult = MessageBox.Show("Your username and password has been recorded", "Congratulations", MessageBoxButtons.OK);
  
                  CreateTable();
  
                  if (dialogresult == DialogResult.OK)
                  {
                     this.Hide();
  
                     Form1 form = new Form1();
                     form.ShowDialog();
  
                     this.Close();
                  }
  
  private bool CheckUsername()
          {
              OleDbConnection conn = new OleDbConnection();
  
              conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\Archives\Projects\Program\Sell System\Sell System\App_Data\db1.accdb";
  
              conn.Open();
  
              OleDbCommand cmd = new OleDbCommand("SELECT [Username] FROM [Member]", conn);
  
              cmd.Parameters.Add("Username", System.Data.OleDb.OleDbType.VarChar);
              cmd.Parameters["Username"].Value = this.textBox1.Text;
  
              OleDbDataReader reader = cmd.ExecuteReader();
  
              if (reader.HasRows)
              {
                  System.Media.SoundPlayer sound = new System.Media.SoundPlayer(@"C:\Windows\Media\Windows Notify.wav");
                  sound.Play();
                  MessageBox.Show("Username already exists! Please use another username", "Warning");
                  return false;
              }
  
              else
              {
                  System.Media.SoundPlayer sound = new System.Media.SoundPlayer(@"C:\Windows\Media\Windows Notify.wav");
                  sound.Play();
                  MessageBox.Show("Username is not exists!", "Congratulations");
                  return true;
              }
          }
  </code></pre>
  
  <p>edit: even though the username is not exists in the database, "Check Availability" button still recognized it as exists and this is the reason that i can't proceed.</p>
  
  <p>How do i solve this? Thanks in advance!</p>