Hi,
i will try to explain the case and question through my real time scenario.
I have a Student table that is derived from a User table. Student is sub-type of User.
StudentID in Student table is a part of the primary key or foreign key in many other tables.
Between User and Student tables i have a cascade delete defined. But it doesnt go any further. If an entry in User table is deleted, the same id-ed student in Student table will also be deleted "IF" it is not used in other tables as a foreign or private key yet. And will give me a foreign key constraint error if it is used in other tables.
What i am trying to do is: call the delete statement on User table and if no error is returned let user know that student is deleted. If an error returns from database due to a foreign key constraint ask user to enter a leave date for the student and update students records with the newly entered leave date info instead of deleting him/her.
The question is: would it be possible to catch this error through llblgen and act accordingly? When i call student.Delete method an exception will occur. Is there a way to know that it is due to a foreign key constraint problem?
I am not sure if this is a full llblgen related question. Forgive me if it is not.
thanks in advance
-shane