Fix wrong row index used in TSQLiteQuery.Col and TSQLiteQuery.IsNull. Fixes loading more rows after first page on large SQLite tables. Closes #1053

This commit is contained in:
Ansgar Becker
2020-06-27 18:59:04 +02:00
parent 561bba95d0
commit 3b7cdf1583

View File

@@ -7377,7 +7377,7 @@ begin
if FEditingPrepared and Assigned(FCurrentUpdateRow) then begin
Result := FCurrentUpdateRow[Column].NewText;
end else begin
Result := FCurrentResults[RecNo][Column].OldText;
Result := FCurrentResults[FRecNoLocal][Column].OldText;
end;
end else if not IgnoreErrors then
Raise EDbError.CreateFmt(_(MsgInvalidColumn), [Column, ColumnCount, RecordCount]);
@@ -7694,7 +7694,7 @@ begin
if FEditingPrepared and Assigned(FCurrentUpdateRow) then
Result := FCurrentUpdateRow[Column].NewIsNull
else
Result := FCurrentResults[RecNo][Column].OldIsNull;
Result := FCurrentResults[FRecNoLocal][Column].OldIsNull;
end;