Subject | RE: [IBO] Disable Stored Proc? |
---|---|
Author | Dmitriy A. Beloshistov |
Post date | 2007-11-21T14:48:32Z |
Hmm....
1) Extract and rebuild source of SP into buffer text (see
RDB$PROCEDURE_SOURCE etc. in system tables)
2) Remake SP source as:
ALTER PROCEDURE SP_NAME( params ) RETURNS ( outvariables)
AS
BEGIN
EXIT;
END
3) Execute this statement (procedure now enabled but do nothing ;)
4) Do your data manipulation
5) Return old procedure text from buffer text....
WBR,Dmitry Beloshistov AKA [-=BDS=-]
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
Behalf Of Ed Dressel
Sent: Wednesday, November 21, 2007 8:06 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Disable Stored Proc?
--- In IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com> ,
Robert martin <rob@...> wrote:
implement the condition on the stored proc, which will be a little
easier (only have to check in one place). Would much prefer to disable
the stored proc, even if Helen doesn't understand ;-)
Good day.
Ed
1) Extract and rebuild source of SP into buffer text (see
RDB$PROCEDURE_SOURCE etc. in system tables)
2) Remake SP source as:
ALTER PROCEDURE SP_NAME( params ) RETURNS ( outvariables)
AS
BEGIN
EXIT;
END
3) Execute this statement (procedure now enabled but do nothing ;)
4) Do your data manipulation
5) Return old procedure text from buffer text....
WBR,Dmitry Beloshistov AKA [-=BDS=-]
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
Behalf Of Ed Dressel
Sent: Wednesday, November 21, 2007 8:06 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Disable Stored Proc?
--- In IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com> ,
Robert martin <rob@...> wrote:
>Yes, and thanks. Thought about it as an alternative--will probably
> Hi Ed
>
> I have been following this thread and wonder if something like a flag
> field would do.
>
> I'm thinking that the Before update trigger looks at a field in the
> source table that indicates whether to run the SP or not (essentially
> a flag field).
> We have planned to do this in an up coming project.That way you could
> default the field to (Null) to indicate the SP is run but in the
> places you don't want it to run you load it with 'stop' value.
>
>
> Hope that makes sense and is of use :)
implement the condition on the stored proc, which will be a little
easier (only have to check in one place). Would much prefer to disable
the stored proc, even if Helen doesn't understand ;-)
Good day.
Ed