Skip to content

Commit ff6050f

Browse files
committed
fix: crash when grid-exporting without required key
Refs #2311
1 parent 8778d40 commit ff6050f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/dbconnection.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10145,7 +10145,7 @@ function TDBQuery.GetWhereClause: String;
1014510145
for i:=0 to NeededCols.Count-1 do begin
1014610146
j := FColumnOrgNames.IndexOf(NeededCols[i].Name);
1014710147
if j = -1 then
10148-
raise EDbError.CreateFmt(_('Cannot compose WHERE clause - column missing: %s'), [NeededCols[i]]);
10148+
raise EDbError.CreateFmt(_('Cannot compose WHERE clause - column missing: %s'), [NeededCols[i].Name]);
1014910149
if Result <> '' then
1015010150
Result := Result + ' AND';
1015110151
// See issue #769 and #2031 for why we need CastAsText

0 commit comments

Comments
 (0)