sybperl-l Archive
Up Prev Next
From: "Kiriakos Georgiou" <kiriakos dot georgiou at nrl dot navy dot mil>
Subject: RE: nested transactions / savepoints
Date: Nov 22 2000 7:28PM
> Assuming you are not using stored procs, something like this should
> work perfectly:
>
> $sth=$dbh->prepare("
> begin tran
> save tran point_one
> ... do something
> ");
> $sth->execute; etc.
> $sth->prepare("
> save tran point_two
> ...
> ");
>
I use $dbh->rollback; to rollback the entire transaction. Is there
anything magical to the
$dbh->rollback or can I rollback to a savepoint by simply executing a
'rollback tran point_two' in a statement?
thanks,
Kiriakos
|