Click here to Skip to main content
11,412,182 members (57,645 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL
Hey,

My report troughs out an constraint error as soon as i have more then one payment of the same customer in my payment table.

This is the line that the error points to:
this.WaybillsTableAdapter.Fill(this.DataSet1.Waybills,textBox1.Text, textBox3.Text,textBox4.Text );

Error:

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

How do i fix this.

Can i just switch off constraints is so how do i do this
Posted 23-Sep-12 23:43pm
Edited 28-Sep-12 10:47am
Maciej Los177.8K
v3
Comments
OriginalGriff at 24-Sep-12 4:44am
   
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
GoggatjieLiesl at 24-Sep-12 5:07am
   
Thanks hope the question update helps
Sergey Alexandrovich Kryukov at 24-Sep-12 13:39pm
   
What is "constaint"?
--SA
ryanb31 at 28-Sep-12 16:24pm
   
It sounds like your foreign key is blocking it. You'll have to fix that.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 348
1 Sascha Lefévre 175
2 ProgramFOX 130
3 Maciej Los 110
4 Sergey Alexandrovich Kryukov 105
0 Sergey Alexandrovich Kryukov 8,980
1 OriginalGriff 7,263
2 Maciej Los 3,500
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100