I've one to many relationship such as tblStudent and tblInstallments. I'm trying to get data from tblInstallments on the base of matching roll numbers and showing in report table using reportviewer. But I'm getting following exception while running report.
ERROR:- Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
I'm here for kind help from the techies.
winformscsharpexport
Consistent, Positive, Hardworking are my code of life.
According to the error you meet, I think this kind of problem is usually caused by one of the following, you may check your side if it matches any one.
null values being returned for columns not set to AllowDBNull
duplicate rows being returned with the same primary key.
a mismatch in column definition (e.g. size of char fields) between the database and the dataset
And you may also refer to the solution in the similar issue in link below.
Member
26 Points
86 Posts
Unable to show data into report viewer
Aug 30, 2014 07:23 AM|ali_0087|LINK
Hi all,
I've one to many relationship such as tblStudent and tblInstallments. I'm trying to get data from tblInstallments on the base of matching roll numbers and showing in report table using reportviewer. But I'm getting following exception while running report.
ERROR:- Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
I'm here for kind help from the techies.
winforms csharp export
Participant
1398 Points
219 Posts
Re: Unable to show data into report viewer
Sep 01, 2014 05:30 AM|May Wang|LINK
Hi,
Thanks for posting here.
According to the error you meet, I think this kind of problem is usually caused by one of the following, you may check your side if it matches any one.
And you may also refer to the solution in the similar issue in link below.
http://forums.asp.net/t/1258783.aspx?Failed+to+enable+constraints+One+or+more+rows+contain+values+violating+non+null+unique+or+foreign+key+constraints
If you need more help, it would be better to provide your code.
Best Regards,
May
winforms csharp export