mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 14:08:09 +02:00
parent
16fc8c8d9a
commit
47dbaafa89
@ -2230,7 +2230,8 @@ begin
|
||||
CloseDataSets;
|
||||
If LogEvent(detCommit) then
|
||||
Log(detCommit,SCommitting);
|
||||
if (stoUseImplicit in Options) or SQLConnection.AttemptCommit(FTrans) then
|
||||
// FTrans=Nil for the case of forced close.
|
||||
if (FTrans=Nil) or (stoUseImplicit in Options) or SQLConnection.AttemptCommit(FTrans) then
|
||||
begin
|
||||
CloseTrans;
|
||||
FreeAndNil(FTrans);
|
||||
@ -2257,7 +2258,8 @@ begin
|
||||
CloseDataSets;
|
||||
If LogEvent(detRollback) then
|
||||
Log(detRollback,SRollingBack);
|
||||
if SQLConnection.AttemptRollBack(FTrans) then
|
||||
// FTrans=Nil for the case of forced close.
|
||||
if (FTrans=Nil) or SQLConnection.AttemptRollBack(FTrans) then
|
||||
begin
|
||||
CloseTrans;
|
||||
FreeAndNil(FTrans);
|
||||
|
Loading…
Reference in New Issue
Block a user