Cascading updates not working

D

Dave

I have been using this feature for a long time and it's worked like a
champ, but I've come across a time when it doesn't seem to work.

Typically (when it works) there is a parent table that has it's Primary
Key set with the AutoIncrement. There is then a Child table that has a
DataRelation (with constraints) to this PrimaryKey via a column in the
Child table of a column of the same datatype (for many, the same
columnname also). Example:

Parent "Bill"
PK BillID int

Child "BillPayment"
PK BillPaymentID int
BillID int

If you add rows to the parent and get the PK and add rows to the child
with that ID, the Cascading seems to work.


In my case, I'm doing this: Add rows to the parent. Now instead of add
rows to the Child, I Populate the Child table from the database with
all columns except BillID. Then manually set BillID with the value from
the Parent (the autoincrement value). The difference is that the rows
are Modified instead of Added.

Now when the Parent is saved to the database, the Child table's BillID
column does not update!!!

What gives?

Thanks,
-Dave
 
D

David Sceppa

Dave,

Could you send a small bit code that reproduces the problem you're
seeing? That might be the best way to get to the bottom of this issue.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2005 Microsoft Corporation. All rights reserved.
 

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