Why does SQL statement update more records than it needs to?
<p>I have problem with my code specifically on the update code.</p>

<pre><code>private void updatebtn_Click(object sender, EventArgs e)
{
    String Fname = fnametb.Text;
    String Lname = lnametb.Text;
    String Age = agetb.Text;
    String Address = addresstb.Text;
    String Course = coursetb.Text;

    {
        connection.Open();
        OleDbCommand select = new OleDbCommand();
        select.Connection = connection;
        select.CommandText = "Select * From Accounts";
        OleDbDataReader reader = select.ExecuteReader();
        while (reader.Read())
        {
            OleDbCommand insert = new OleDbCommand("UPDATE Accounts SET Firstname=@Fname, Lastname=@Lname, Age=@Age, Address=@Address, Course=@Course WHERE Lastname='"+ reader[2].ToString()+"'", connection);

            insert.Parameters.Add("@Fname", OleDbType.VarChar).Value = Fname;
            insert.Parameters.Add("@Lname", OleDbType.VarChar).Value = Lname;
            insert.Parameters.Add("@Age", OleDbType.VarChar).Value = Age;
            insert.Parameters.Add("@Address", OleDbType.VarChar).Value = Address;
            insert.Parameters.Add("@Course", OleDbType.VarChar).Value = Course;
            insert.ExecuteNonQuery();

            fnametb.Clear();
            lnametb.Clear();
            agetb.Clear();
            addresstb.Clear();
            coursetb.Clear();
            listBox1.Items.Clear();
            searchtb.Clear();
        }
        connection.Close();
    }
}
</code></pre>

<p>above is my code. Whenever I update one record, all the records in the table are affected.I think there's something wrong with the reader.
Please help, thanks.</p>
