View_Atten_One_By_One mydataset1 = new View_Atten_One_By_One();
View_Atten_One_By_OneTableAdapters.DataTable1TableAdapter nfdAdapter1 = new View_Atten_One_By_OneTableAdapters.DataTable1TableAdapter();
nfdAdapter1.Fillattenbyemp(mydataset1.DataTable1, txtEmpId.Text);
ViewAttenByEmp nfpbdel1 = new ViewAttenByEmp();
nfpbdel1.SetDataSource(mydataset1);
crystalReportViewer1.ReportSource = nfpbdel1;
错误
无法启用约束。一行或多行包含违反非null,唯一或外键约束的值。
异常抛出此代码段
nfdAdapter1.Fillattenbyemp(mydataset1.DataTable1,txtEmpId.Text);
答案 0 :(得分:0)
如果发生此类错误,请删除DataSet中的主键