InvalidConstraintException when updating typed DataSet

G

Guest

My typed dataset has two tables, ATTRIBUTES and ATTRIBUTEVALUE_USER with a
relationship named ATTRIBUTESATTRIBUTEVALUE_USER. When updating the database
I sometimes (5-10% of the time) get an excpetion:

System.Data.InvalidConstraintException: ForeignKeyConstraint
ATTRIBUTESATTRIBUTEVALUE_USER requires the child key values (31075) to exist
in the parent table.

Update are done by DataAdapters (inserts), by first updating the parent
table and then the child table.

As the relationship between the two tables is defined in the typed dataset,
updates to the parent table are propagated to the child table (indicated by
the number 31075 above).

Any clues on why I get this error?

Thanks,

Niels
 
G

Guest

Sorry - this was due to a bug of mine. I had been chasing it for so long,
but just found it today.

Niels
 

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