title: Checking if MS Access database in ASP.NET C# returns any rows
body: <p>I have this code:</p>
  
  <pre><code>cmd.Parameters.AddWithValue("@userName", txtLoginUserName.Text.Trim());
  cmd.Parameters.AddWithValue("@password", txtLoginPassword.Text.Trim());
  
  string sqllogin = "SELECT [username],[password] FROM users WHERE ([username] = @userName AND [password] = @password) ";
  
  try
  {
      con.Open();
      cmd.CommandText = sqllogin;
      int store = cmd.ExecuteNonQuery();
  
      con.Close();
      Label4.Text = store.ToString();
  }
  catch (Exception ex)
  {
      con.Close();
  }
  </code></pre>
  
  <p>Whenever it executes, it prints out <code>0</code> in <code>label4</code>. Is that the correct way to check how many rows are returned?</p>