Subject Re: [firebird-support] Problem with COMMIT
Author Paul Vinkenoog
Hello Walter,

> I have the following Stored Procedure:
> (...)
> COMMIT;
>
> And the SQL Manager said me that the word COMMIT is a syntax error.

Correct; you can't commit or rollback from within a stored procedure or trigger.

> But....if I don't use COMMIT then the column PRD_FECINV is not updated.

You commit your work after the procedure has run, in the calling script or code, or even "by hand" in DSQL.

BTW, there are *some* ways to do transaction control in PSQL (the Stored Procedure and trigger language). One way is to use IN AUTONOMOUS TRANSACTION DO. The other involves EXECUTE STATEMENT. Both ways are only possible in Firebird 2.5 - see the Release Notes.


Hope this helps,
Paul Vinkenoog