InvalidConstraintException when updating typed DataSet

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Sorry - this was due to a bug of mine. I had been chasing it for so long,
but just found it today.

Niels
 
Back
Top