Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7844207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:48:29+00:00 2026-06-02T16:48:29+00:00

I have a Dataset that has 3 TablesAdapters linked together (both the relationships and

  • 0

I have a Dataset that has 3 TablesAdapters linked together (both the relationships and foreign-keys came over from the DB design). I’m trying now to to bind the TableAdapter with the foreign keys on it, I get the following:

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

so after a little digging, I found that it doesn’t like that I have Identical foreign keys on the TableAdapter (even though the DB contraints are OK with this).

How to I get my DataSet (or the TableAdpapter) to only look at the primary key of the table as a contraint?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:48:30+00:00Added an answer on June 2, 2026 at 4:48 pm

    Ok, so 5 seconds after I post this I find the answer (isn’t that how it always works?)

    The problem was that I added a table adapter that queried from my multiple tables, not just a single table. This tableAdapter looks like it just “decided” what columns to use for unique Contraints.

    To fix the issue, I had to go into the Dataset designer and search for “UniqueConstraint” until I found the one that was using two foreign key columns of the restraint instead of the one primary key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataSet with some DataTables that are linked together with DataRelations (classic
I have to add all the Id from the dataset that has Status value
I have a DataGridView that's bound to a DataSet. It has columns DateCreated, Weight,
I have a dataset that returns questions and answers from the database, each answer
I have a dataset that has just one column and one row. It gives
When I have a simple DataSet that has a table with simple column names
I have a dataset that has an optional last TD that is required to
Let's say I have a Stata dataset that has two variables: type and price
I have an rdlc that has a separately-defined dataset. The time has come that
I have a dataset that is has a number of groups. I have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.