Assistance with updating data with dependancies
Posted: Fri Jun 23, 2006 8:24 am
I have 2 tables, one purely exists to satisfy a 1 to many relationship with the main table called: role.
To perform the inserts I perform this process:
Intert into role - return the row id
Create new entries into table 2 using values from a multi select list and linking this value to the role id.
Simple and neat.
Now, the question:
when I wish to update the data what would be the best practice to do this?
I have 1 major idea atm: update the role document, delete all previous entries for that role in table 2, then perform an instert.
Now this has drawbacks such as what happens imbetween the delete and the insert, and jsut generally doesnt feel right.
Any ideas?
To perform the inserts I perform this process:
Intert into role - return the row id
Create new entries into table 2 using values from a multi select list and linking this value to the role id.
Simple and neat.
Now, the question:
when I wish to update the data what would be the best practice to do this?
I have 1 major idea atm: update the role document, delete all previous entries for that role in table 2, then perform an instert.
Now this has drawbacks such as what happens imbetween the delete and the insert, and jsut generally doesnt feel right.
Any ideas?