ä»ä»£ç æ¥çï¼åºè¯¥æ¯C_Sname为空ï¼æè
ä¸æ¯æ£ç¡®çå段åé æç 建议修æ¹ä¸º: public void UpdateFinalScore(string Sname, string C_Sname) {//ä¿®æ¹FinalScore表çæ绩 if(string.IsNullOrEmpty(C_Sname)){ return; } SqlConnection conn = new SqlConnection(Properties.Settings.Default.GradeManagementSystemConnectionString); SqlCommand comm = new SqlCommand("update FinalScore set [" + C_Sname + "] = '0' where Sname='" + Sname + "' ", conn);
温馨提示:答案为网友推荐,仅供参考