Skip to content

Commit 328fb72

Browse files
committed
fix: take care for escaped ENUM definitions
Refs #799
1 parent d7b1faa commit 328fb72

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/dbconnection.pas

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9211,14 +9211,20 @@ function TDBQuery.MaxLength(Column: Integer): Int64;
92119211
function TDBQuery.ValueList(Column: Integer): TStringList;
92129212
var
92139213
ColAttr: TTableColumn;
9214+
i: Integer;
92149215
begin
92159216
Result := TStringList.Create;
92169217
Result.QuoteChar := '''';
92179218
Result.Delimiter := ',';
92189219
ColAttr := ColAttributes(Column);
92199220
if Assigned(ColAttr) then case ColAttr.DataType.Index of
9220-
dbdtEnum, dbdtSet:
9221+
dbdtEnum, dbdtSet: begin
92219222
Result.DelimitedText := ColAttr.LengthSet;
9223+
// Take care for escaped ENUM definitions, see issue #799
9224+
for i:=0 to Result.Count-1 do begin
9225+
Result[i] := FConnection.UnescapeString(Result[i]);
9226+
end;
9227+
end;
92229228
dbdtBool:
92239229
Result.DelimitedText := 'true,false';
92249230
end;

0 commit comments

Comments
 (0)