title: SqlDataReader Force It To Read One Row At A Time
body: <p>It appears that SqlDataReader reads ahead </p>
  
  <pre><code>while (rdrMainLoop.Read())
  {
      sID = rdrMainLoop.GetInt32(0);
      nearDupID = rdrMainLoop.IsDBNull(2) ? 0 : rdrMainLoop.GetInt32(2);
      sqlCmdProducer.CommandText = "update [docSVsys] set [FTSnearDupID] = '" + sID.ToString() + "' where [sID] = '" + (sID + 1).ToString() + "';";
      sqlCmdProducer.ExecuteNonQuery();
  }
  </code></pre>
  
  <p>In this example I am updating the next line.<br>
  But when I .Read() the next line SqlDataReader does not read the current value.<br>
  I assume it batches ahead for speed.<br>
  Is there a way to force SqlDataReader to read one line at a time.<br>
  I am good with a dirty read (has to be as I may update that line).</p>