0
con.Open();
//loading the image table
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter("Select * from Employee_Reg_Form", con);
da.Fill(dt);
//create a new row that will be added
DataRow r = dt.NewRow();
//specify the records to save
//Employee Registeration Codes
r[0] = EmpRegCodSNtbox.Text;
r[1] = EmpRegCodtbox.Text;
这是用于新的ROW插入。我需要你使用类似的代码,但更新整行数据? 请建议。更新查询在SQL表中更新行(行号明智),而不使用C#中的SET关键字?
实体框架可以帮助你做到这一点 –