Ngetichk says:
SqlCommand cmd =
new
SqlCommand(
"UPDATE classresult SET English = "
+ Eng.Text +
", Kiswahili="
+ Kisw.Text +
", Maths="
+ Maths.Text +
", Bilogy="
+ Bio.Text +
", Physics="
+ Phy.Text +
", Chemistry="
+ Chem.Text +
", Geo="
+ Geo.Text +
", History="
+ Hist.Text +
", Agricture="
+ Agric.Text +
", bussines ="
+ Buss.Text +
", RE="
+ RE.Text +
" WHERE admno = "
+ tbadmno.Text +
""
, con);
Change with the below line and check.
SqlCommand cmd = new SqlCommand("UPDATE classresult SET English = '" + Eng.Text + "', Kiswahili='" + Kisw.Text + "', Maths='" + Maths.Text + "', Bilogy='" + Bio.Text + "', Physics='" + Phy.Text + "', Chemistry='" + Chem.Text + "', Geo='" + Geo.Text + "', History='" + Hist.Text + "', Agricture='" + Agric.Text + "', bussines ='" + Buss.Text + "', RE='" + RE.Text + "' WHERE admno = '" + tbadmno.Text + "'", con);