NetTalk Central

Author Topic: NT sync and dct RI Delete  (Read 3143 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT sync and dct RI Delete
« on: April 25, 2020, 07:46:22 AM »
Seting the Referential Integrity for Delete in the dct, setting it to Restrict you can never delete the parent file.
When trying to delete the parent you get the Cant delete bacause it has childs message and its ok.
Then I go to the childs and deleted all.
Trying again you get the same message, you can delete the parent.
That is because when you delete the childs NT does not do it phisically but changing the dct field.
But the RI is still there.
I suppouse Nt does it (not delete but change dts) deriving the delete class.
Is there any way to add code to dont restrict if all the parent childs has dct>0?
Thanks
« Last Edit: April 27, 2020, 07:28:16 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT sync and dct RI Delete
« Reply #1 on: April 28, 2020, 03:17:40 AM »
Hi Alberto,

>> Is there any way to add code to don't restrict if all the parent childs has dct>0?

And by "delete" here you mean set the parent dts > 0 ? (ie the parent is not deleted either, just marked as "deleted")?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT sync and dct RI Delete
« Reply #2 on: April 28, 2020, 03:48:25 AM »
You have a parent with children
RI is set as restrict
Try to delete the parent... you cant because of its children
Delete the children, all children are deleten and hemce its dts is set>0
Try to delete parent... you cant
-----------
Regards
Alberto