Subject | Re: Transactional Commands in Stored procedures. |
---|---|
Author | Alexander V.Nevsky |
Post date | 2003-07-22T11:42Z |
--- In firebird-support@yahoogroups.com, Tim Ledgerwood <tim@s...>
wrote:
related to multiple Mahesh's questions too.
DECLARE PROCEDURE MYPROCEDURE
(
INPUT VARIABLES
)
AS
BEGIN
INSERT INTO THISTABLE
EXECUTE THATPROCEDURE
EXECUTE ANOTHERPROCEDURE
DO SOMETHINGELSE
When Any Do /*You can handle particular exceptions differently*/
INSERT INTO ERRORLOGTABLE (X, Y, Z)
END
Begin..End blocks and Suspends have influence on exception handling.
Best regards, Alexander.
wrote:
> At 06:26 PM 21/07/2003 +0200, you wrote:that
> Its a very useful thing. In Sybase, you can have a stored procedure
> calls other stored procedures. (As you can in many DBMSs). So whatyou can
> do is something like this :Tim, when nothing helps, perhaps it's time to RTFM ;) BTW, this is
>
> DECLARE PROCEDURE MYPROCEDURE
> (
> INPUT VARIABLES
> )
> AS
> BEGIN
> BEGIN TRANSACTION
> INSERT INTO THISTABLE
> EXECUTE THATPROCEDURE
> EXECUTE ANOTHERPROCEDURE
> DO SOMETHINGELSE
> COMMIT TRANSACTION
>
> EXCEPT
> BEGIN
> ROLLBACK
> INSERT INTO ERRORLOGTABLE
> (X, Y, Z)
> END
> END
related to multiple Mahesh's questions too.
DECLARE PROCEDURE MYPROCEDURE
(
INPUT VARIABLES
)
AS
BEGIN
INSERT INTO THISTABLE
EXECUTE THATPROCEDURE
EXECUTE ANOTHERPROCEDURE
DO SOMETHINGELSE
When Any Do /*You can handle particular exceptions differently*/
INSERT INTO ERRORLOGTABLE (X, Y, Z)
END
Begin..End blocks and Suspends have influence on exception handling.
Best regards, Alexander.