One of my data tables contains parent/child data relationships like this:
1 -> 2 -> 3 -> 4 -> etc....
such that, for example, 2 is the child record of 1 and is the parent record of 3 and these are all displayed in a TreeGrid.
I need help on how to solve two problems:
1. How do I prevent a user from deleting a record when it still has one or more child records? I came up with what I know is a very ugly hack to deal with this yesterday....but I'd prefer to discover the correct way of handling this.
2. When multiple users are using the application, (using the example data above) it will let UserA delete record "4" and then allow UserB to add child records to "4" because the UserB client side cache of the data knows nothing about UserA having just deleted "4" from the database. How do I prevent this from happening?
Any help to even point me in the right direction would be most appreciated by my entire family who would love it if I can solve this problem and remain employed :-)
Thanks,
Jerry
1 -> 2 -> 3 -> 4 -> etc....
such that, for example, 2 is the child record of 1 and is the parent record of 3 and these are all displayed in a TreeGrid.
I need help on how to solve two problems:
1. How do I prevent a user from deleting a record when it still has one or more child records? I came up with what I know is a very ugly hack to deal with this yesterday....but I'd prefer to discover the correct way of handling this.
2. When multiple users are using the application, (using the example data above) it will let UserA delete record "4" and then allow UserB to add child records to "4" because the UserB client side cache of the data knows nothing about UserA having just deleted "4" from the database. How do I prevent this from happening?
Any help to even point me in the right direction would be most appreciated by my entire family who would love it if I can solve this problem and remain employed :-)
Thanks,
Jerry
Comment