Subject Re: Problem with ADODB and transaction handling
Author mi_whitebrook_13
> PHP4 or PHP5?
PHP 4.3.9
> I manage 'saves' independent of the queries, so that is probably
why I
> am not seeing any problem. I presume you are getting some parts of
a
> 'package' committed where you had expected the whole to be rolled
back
> after a problem. Starting and Stopping transactions manually may be
> needed rather than just relying on the default actions.
i am doing the following (in pseudo-php-code):
create and connect
StartTrans()
insert/update some stuff
calculate some stuff
if(some_error)
die("some error");
insert/update some stuff
if(send_email()!=SUCCESS)
die("email could not be sent!");
CompleteTrans()

the transaction should be rolled back if the CompleteTrans() is not
reached, but instead it is commited. this is because ADOdb continues
to use the link_identifier and does not start a transaction and use
the transaction_identifier. if i do a manual rollback before a die()
it also works. but you cannot say where in a complex script there can
be an error and put an rollback everywhere.

> See http://www.php.net/manual/en/function.ibase-trans.php for the
> changes between PHP4 and PHP5
well, as far as i understand the changes between php4 and php5 i think
this problem will not occur with php5.