Re: Forms5: Prevent from delete

From: DanHW <danhw_at_aol.com>
Date: 29 Sep 2000 04:25:44 GMT
Message-ID: <20000929002544.15453.00000200_at_ng-fr1.aol.com>


>
>Is there a way to prevent users from deleting a record from a block when
>other tables refer to this record. I prefer 'generic code', which uses the
>database constraints. I can write code myself which checks table a,b,c and
>so on. But when a new table 'd' is build (which also refers to it), I have
>to write code for checking that table too.
>

If you have real keys built, you will not be able to delete it - you will get an error message. If you want, you can trap the error and provide a nice message.

Alternatively, you can use the system tables to see what tables have a FK pointing to the table and use dynamic SQL to check those.

Dan Hekimian-Williams Received on Fri Sep 29 2000 - 06:25:44 CEST

Original text of this message