DataSet constraints

B

Bert Sachs

Hi

I have a typed DataSet that contains two tables. The second table has a
foreign key that refers to the primary key of the first table. When i fill
the first table there is no problem. But when i fill the second table i get
the following error:

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

Many thanks in advance
 
W

William Ryan eMVP

Bert:

That error typically means that something isn't kosher in the second table,
either a key value that's not present in the parent or a null value. If you
are positive neither case exists, I'd run a where clause on both queries and
try to narrow down what will work and what won't to determine where the
problem is.

HTH,

Bill

www.devbuzz.com
www.knowdotnet.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top