My details view shows current job position by linking a person to a position in a bridging table called tblPositionFill.
The fields in that table are:
PositionFillID (PK)
PositionID (FK)
PersID (FK)
FromDate (DateTime)
ToDate (DateTime)
What I would like to do is either:
1. Prevent user from inserting a new row unless he closes out the current row by entering a ToDate for the position. (Prompt user accordingly)
-or-
2. Automatically upate the current position ToDate upon entry of a new position assignment.
-or-
3. Upon terminating current assignment, switch the detailsview to insert and prompt the user to create the new assignment.
(or perhaps a combo of the three)
In the back of my head, I am thinking "Trigger" in SQL Server. I have never created nor used one. I'm gonna play with that for now...hopefully my favorite .Net guru will come along and make a suggestion.
The fields in that table are:
PositionFillID (PK)
PositionID (FK)
PersID (FK)
FromDate (DateTime)
ToDate (DateTime)
What I would like to do is either:
1. Prevent user from inserting a new row unless he closes out the current row by entering a ToDate for the position. (Prompt user accordingly)
-or-
2. Automatically upate the current position ToDate upon entry of a new position assignment.
-or-
3. Upon terminating current assignment, switch the detailsview to insert and prompt the user to create the new assignment.
(or perhaps a combo of the three)
In the back of my head, I am thinking "Trigger" in SQL Server. I have never created nor used one. I'm gonna play with that for now...hopefully my favorite .Net guru will come along and make a suggestion.