Subject | Re: [firebird-support] Detecting dependancies |
---|---|
Author | Milan Babuskov |
Post date | 2005-12-16T15:34:40Z |
Robert martin wrote:
case would matter. Also, the above select does not give you all the
dependencies.
FlameRobin's code that reads the dependencies between objects. Function
MetadataItem::getDependencies() in file metadataitem.cpp is the one you
need.
Alter procedure to have an empty body (comment all the code inside with
/* */) and later just remove the comments.
--
Milan Babuskov
http://www.flamerobin.org
> The following SQL will list all the dependencies in the ClientCustom tableNo. UPPER is a bad idea. If someone uses quoted identifiers, then the
>
> SELECT DISTINCT dep.RDB$Field_Name AS FieldName
> FROM RDB$Dependencies dep
> WHERE UPPER(dep.RDB$Depended_On_Name) = 'CLIENTCUSTOM'
>
> Is this safe to use?
case would matter. Also, the above select does not give you all the
dependencies.
> In my results I get the field I knew was in use byIt is not so simple. If you know C++, you can take a look at
> a stored procedure which is good. However I also get a dependency with
> no field name, what does this mean?
FlameRobin's code that reads the dependencies between objects. Function
MetadataItem::getDependencies() in file metadataitem.cpp is the one you
need.
>>Is there a way toYes.
>>
>>a) Detect a dependency and not alter the field.
>>b) Easily disable a stored procedure and later re-enable.Yes.
Alter procedure to have an empty body (comment all the code inside with
/* */) and later just remove the comments.
--
Milan Babuskov
http://www.flamerobin.org