Click here to Skip to main content
11,927,711 members (54,390 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# SQL

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 );


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 Los210.1K
OriginalGriff 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 24-Sep-12 5:07am
Thanks hope the question update helps
Sergey Alexandrovich Kryukov 24-Sep-12 13:39pm
What is "constaint"?
ryanb31 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | 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