Here's the deal. I have a Typed Dataset. For simplicity, we'll say it has 2 tables Parent and Child with a FK in Child, relationname = FK, cascade on update. Kyes are negative autoincrement.
I bind Parent to dgParent and I bind dgChild to the Parent table, FK datamember. The grids work properly, except in the following scenario.
1. Add a new row to the parent table. (PK = -1)
2. Save. The new Parent key is updated from the return value of the stored procedure.
3. Add a new row to dgChild for the row in the parent table. Receive FKConstraint error message saying the FK value -1 must exist in the parent table.
If I add the child row BEFORE saving, it works great, but in the above scenario, the currencymanager for the child doesn't seem to have gotten the message that it should be using a new FK value.
Thanks,
Chris
--------------------------------
From: Chris Waldmann
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>QhvQTronDUuropZxUS7XHA==</Id>