mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-04 22:54:25 +01:00
TSQLConnection.DoInternalDisconnect: safe with Assigned(FStatements) - like TDatabase.CloseDataSets etc.
(cherry picked from commit 8bd9651abd)
This commit is contained in:
parent
7340e8b530
commit
2dd77e5a26
@ -1473,14 +1473,17 @@ Var
|
||||
L : TList;
|
||||
|
||||
begin
|
||||
L:=FStatements.LockList;
|
||||
try
|
||||
For I:=0 to L.Count-1 do
|
||||
TCustomSQLStatement(L[i]).Unprepare;
|
||||
L.Clear;
|
||||
finally
|
||||
FStatements.UnlockList;
|
||||
end;
|
||||
If Assigned(FStatements) then
|
||||
begin
|
||||
L:=FStatements.LockList;
|
||||
try
|
||||
For I:=0 to L.Count-1 do
|
||||
TCustomSQLStatement(L[i]).Unprepare;
|
||||
L.Clear;
|
||||
finally
|
||||
FStatements.UnlockList;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSQLConnection.StartTransaction;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user