Subject Re: [ib-support] Deleting a record having child records gives problem.
Author Paul Poulain
At 10:07 18/10/01 +0000, you wrote:
>Hello Everybody,
>
>I am facing a strange problem with FireBird and Delphi 5 combination.
>I am using Interbase Components to connect to Interbase server.
>
>When I try to delete a record from a table that has child records
>present in another table, it shows an execption first and then my
>application either hangs or behaves abnormal.
>
>I don't know whether it is my programming mistake or some bug some
>bug somewhere.
>
>It would be a great help if somebody can help.
>
>TIA and Best regards,

The constraint between child and father must be cascade, and not default
value (restrict).
With cascade, deleting the father deletes the childes, while restrict,
delete father is forbidden if you have childs.

Note : you can also use "set null". In this case, childs are not deleted,
but link is set to null (no father...)

Paul