Subject Re: AW: [firebird-support] transaction
Author Doug Chamberlin
On 5/8/11 3:03 AM, Olaf Kluge wrote:
> I understand. Can I during execution a stored procedure manually commit some
> parts?
>
> If a stored procedure calls a second one, the second commits already if
> finished and the first later if it finished?
>
> Sorry for my questions, but in our project this is very important.

The Firebird transaction model does not allow for transaction management
(commit,rollback, etc) within a stored procedure. Only the calling
application manages transactions.

Therefore, you need to re-think your application approach to all this.
If you need to prepare some data that needs to be visible to other
database users (that is, outside the current transaction) the
application needs to prepare and send and commit that data. Then it
needs to start a new transaction for further processing. All this should
NOT be done within a Firebird stored procedure. Firebird stored
procedures contain pieces of processing that are used WITHIN a scheme to
manage transactions.

All this is really an application data management issue and not a
Firebird issue. You might get better help from a forum that addresses
issues with your database access components.