title: Counting number of affected rows when using mysql in c#
body: <p>I have a WinForms project in C# that connects to a MySQL database. I'm trying to count the number of rows in the result, i can't use <code>RecordsAffected</code> as this property only has the correct value after the read is complete and as you can see from the code below I need it before. Any idea's on how to do this?</p>
  
  <pre><code>string sql = "SELECT * FROM Tigers WHERE Link='" + link + "'";
  
  MySqlCommand cmd = new MySqlCommand(sql, conn);
  MySqlDataReader rdr = cmd.ExecuteReader();
  
  while (rdr.Read())
  {
      if (rdr.RecordsAffected == 0)
      {
          //can't find in db               
      }
      else
      {
          //found at least 1 result
      }
  </code></pre>