Please use "for" loop for this. Refer below code-
if (dt.Rows.Count > 0)
{
for (i=0; i<=dt.Rows.Count;i++)
{
Stratd = dt.Rows[i][11].ToString();
Endd = dt.Rows[i][12].ToString();
int Totaldays = duration(Stratd, Endd);
int Totaldayss = durationn(System.DateTime.Now.ToString("MM/dd/yyyy"), Endd);
string str = Convert.ToString(Totaldays);
string str1 = Convert.ToString(Totaldayss);
OleDbCommand cmd123 = new OleDbCommand("UPDATE SlideShowTable SET Total_Days='" + str + "',Days_remain='" + str1 + "'", con);
cmd123.ExecuteNonQuery();
}
}