SqlCommand UpdateCmd = new SqlCommand("Update StudentTbl SET Firstname= @Firstname, Lastname= @Lastname, Birthday= @Birthday, Strand= @Strand, Section= @Section WHERE SID = @ID)", ConClass.con);
UpdateCmd.Parameters.AddWithValue("@ID", textBox1.Text);
UpdateCmd.Parameters.AddWithValue("@Firstname", textBox2.Text);
UpdateCmd.Parameters.AddWithValue("@Lastname", textBox3.Text);
UpdateCmd.Parameters.AddWithValue("@Birthday", textBox4.Text);
UpdateCmd.Parameters.AddWithValue("@Strand", comboBox1.Text);
UpdateCmd.Parameters.AddWithValue("@Section", comboBox2.Text);
ConClass.con.Open();
UpdateCmd.ExecuteNonQuery();
ConClass.con.Close();
MessageBox.Show("Information was updated successfully!");
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
comboBox1.Text = "Select Strand";
comboBox2.Text = "Select Section";
Ref_Grid();
==========