winform下出现如下的错误,该如何解决?
SqlConnection con=new SqlConnection("server=***;uid=ufsubsys;database=***;pwd=***");
string strsql="***************";
SqlDataAdapter da=new SqlDataAdapter(strsql,con);
Dset ds_fh=new Dset();
da.Fill(ds_fh,"t_sale_report"); //填充时出错
cyreport_fh report_fh=new cyreport_fh();
report_fh.SetDataSource(ds_fh);
this.crystalReportViewer1.ReportSource=report_fh;
错误提示如下:
未处理的“System.Data.ConstraintException”
类型的异常出现在 system.data.dll 中
其他信息:未能启用约束。
一行或多行中包含违反非空、唯一或外键约束的值。