hi,
i work on a windows application and i use crystal report. i use this code to generate report from database:
private void imprimerB3button_Click(object sender, EventArgs e)
{
SqlCeConnection con = new SqlCeConnection();
con.ConnectionString = @" Data source= |Datadirectory|\Database1.sdf";
Database1DataSet ds = new Database1DataSet();
SqlCeParameter paramNom = new SqlCeParameter("@nom", nomimprimerTextBox.Text);
SqlCeDataAdapter da = new SqlCeDataAdapter("Select Personne.[Nom],Personne.[Prenom],Personne.[DateNaissance] from Personne where Personne.[Nom]=@nom", con);
da.SelectCommand.Parameters.Add(paramNom);
con.Open();
da.Fill(ds,"Personne");
B3Report b3rpt = new B3Report();
b3rpt.SetDataSource(ds);
crystalReportViewer1.ReportSource = b3rpt;
crystalReportViewer1.Refresh();
}
when i run the application i get this error message:"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."
please help me and thanks