fix: crash when grid-exporting without required key

Refs #2311
This commit is contained in:
Ansgar Becker
2025-12-07 19:55:37 +01:00
parent 07d29c8e30
commit 2c672dd7f9

View File

@@ -10312,7 +10312,7 @@ begin
for i:=0 to NeededCols.Count-1 do begin
j := FColumnOrgNames.IndexOf(NeededCols[i].Name);
if j = -1 then
raise EDbError.CreateFmt(_('Cannot compose WHERE clause - column missing: %s'), [NeededCols[i]]);
raise EDbError.CreateFmt(_('Cannot compose WHERE clause - column missing: %s'), [NeededCols[i].Name]);
if Result <> '' then
Result := Result + ' AND';
// See issue #769 and #2031 for why we need CastAsText