cmd.Parameters.Add("@stud_rollno", txtstudroll);
cmd.Parameters.Add("@paidfee", txtpaid);
cmd.Parameters.Add("@remain_fee", txtremain);
that is incorrect that why you are getting error like that.
now to corect it
cmd.Parameters.AddWithValue("@stud_rollno", txtstudroll.Value);
cmd.Parameters.AddWithValue("@paidfee", txtpaid.Value);
cmd.Parameters.AddWithValue("@remain_fee", txtremain.Value);
cmd.Parameters.Add("@paidfee", txtpaid);
cmd.Parameters.Add("@remain_fee", txtremain);
that is incorrect that why you are getting error like that.
now to corect it
cmd.Parameters.AddWithValue("@stud_rollno", txtstudroll.Value);
cmd.Parameters.AddWithValue("@paidfee", txtpaid.Value);
cmd.Parameters.AddWithValue("@remain_fee", txtremain.Value);
0 comments: