Subject Re: [firebird-support] Detecting dependancies
Author Alexandre Benson Smith
Robert martin wrote:

>We have an issue where clients can add their own custom fields to our
>database (any data type). They can also edit these field types, say
>changing from 10 to 15 chars.
>We have a problem where the alteration process causes an error due to a
>stored procedure (and probably a view) that is based on the particular
>field exists. Is there a way to
>a) Detect a dependency and not alter the field.
>b) Easily disable a stored procedure and later re-enable.
To detect the dependecie is easy ! just look on rdb$dependencies table.

To recreate the SP is a bit more complex.. since the SP cuold have other
SP's that depend on it and so on.

You could alter the Sp to an empty body, and then recreate it.

But I think it is a bit dangerous, what about if the SP has a declared
variable as varchar(10) and then your costumer change the field to
varchar(15) ? how would you detect this kind of change ?

see you !

Alexandre Benson Smith
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil