Cascade without relation

  • Thread starter Thread starter Wei Wang
  • Start date Start date
W

Wei Wang

I have two datatables, dtTable1 has an INDENTITY column, dtTable2 has a
integer column to have the value of table1 indentity column but it can be
null. so I can't create the relation between tables (unless there is some
kind of ignore null relation). Now when I add new row to dtTable1, then add
new row to dtTable2 with the same indentity value (of cause a temp value,
will change in dtTable1 when save to database) from dtTable1, is there any
way to cascade value to dtTable2 when I save data into database?

Please...
Wei
 
You should be able to create a relation between dtTable1 and dtTable2 even
if the foreign key field in dtTable2 can be null. So then you can cascade
the value through the relation as usual.

Hope this helps,

Markus Hjarne
 
Oh, my goodness. you are certainly right.
I tried again after I got rid of some non-null ophan records in table2,
relationship is created successfully even there are still a lot records with
null in table2.

that misunderstanding seems existing in my mind for ever. thanks so much
clearing that up.

Wei
 
Back
Top