This question is locked. New answers and comments are not allowed.
Looking for suggestions about the best way to go about something.
We have an employee; the employee can have payroll, training, and several other child tables associated with a row. We allow deleting of the employee, but only if there are no rows in any of the child tables. Previously we used a database function which checked for any child records in any of the tables and returned a value indicating whether deletion was allowed or not for that employee.
What would the best approach to doing this using Data Access? Or is this still the kind of thing best left to stored procedures; and if so, can someone walk me through how we could access this function via Data Access?
We have an employee; the employee can have payroll, training, and several other child tables associated with a row. We allow deleting of the employee, but only if there are no rows in any of the child tables. Previously we used a database function which checked for any child records in any of the tables and returned a value indicating whether deletion was allowed or not for that employee.
What would the best approach to doing this using Data Access? Or is this still the kind of thing best left to stored procedures; and if so, can someone walk me through how we could access this function via Data Access?