if (varFC != "")
{ cmd =
new OleDbCommand("DELETE FROM tblStudentFC WHERE tblStudentFC.StudentID = " + varStudentID + ";", conn);
cmd.ExecuteNonQuery(); }
cmd = new OleDbCommand("SELECT tblIndexFC.Description, tblIndexFC.ID FROM tblIndexFC "
+ "WHERE (((tblIndexFC.FCID + ' - ' + tblIndexFC.Description)='" + ddlFC.SelectedValue.ToString() + "'));", conn);
reader = cmd.ExecuteReader();
if (reader.Read())
{ cmd = new OleDbCommand("INSERT INTO tblStudentFC(StudentID, FCID) VALUES(?,?)", conn);
cmd.Parameters.Add("@StudentID", OleDbType.Numeric, 20).Value = varStudentID;
cmd.Parameters.Add("@FCID", OleDbType.Numeric, 50).Value = reader["ID"].ToString();
cmd.ExecuteNonQuery(); }
to change it into an UPDATE statement.
Meaning when I edit the information, I need to use an UPDATE statement to save it. I'm stuck.
Could you please help?
Thank you.