Click here to Skip to main content
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 22:43pm
Edited 28-Sep-12 9:47am
Maciej Los136.3K
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 6,656
1 Sergey Alexandrovich Kryukov 6,490
2 CPallini 5,310
3 George Jonsson 3,584
4 Gihan Liyanage 2,650


Advertise | Privacy | Mobile
Web04 | 2.8.140921.1 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2014
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