diff --git a/source/apphelpers.pas b/source/apphelpers.pas index fff5712e..361c5379 100644 --- a/source/apphelpers.pas +++ b/source/apphelpers.pas @@ -3262,7 +3262,7 @@ begin Inc(FWarningCount, FConnection.WarningCount); except on E:EDbError do begin - if FStopOnErrors or (i = FBatch.Count - 1) then begin + if FStopOnErrors or (i = FBatch.Count) then begin FErrorMessage := E.Message; ErrorAborted := True; end;