Skip to content

Commit a01acd1

Browse files
committed
fix: TDBQuery.Col() crashes with "Column not available" on certain locales
Refs #2338
1 parent e635ae5 commit a01acd1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/dbconnection.pas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,7 @@ constructor TDBConnection.Create(AOwner: TComponent);
20652065
FInfSch := 'information_schema';
20662066
FInformationSchemaObjects := TStringList.Create;
20672067
FInformationSchemaObjects.CaseSensitive := False;
2068+
FInformationSchemaObjects.UseLocale := False;
20682069
// Characters in identifiers which don't need to be quoted
20692070
FIdentCharsNoQuote := ['A'..'Z', 'a'..'z', '0'..'9', '_'];
20702071
FMaxRowsPerInsert := 10000;
@@ -8064,8 +8065,10 @@ constructor TDBQuery.Create(AOwner: TComponent);
80648065
FRecordCount := 0;
80658066
FColumnNames := TStringList.Create;
80668067
FColumnNames.CaseSensitive := False;
8068+
FColumnNames.UseLocale := False;
80678069
FColumnOrgNames := TStringList.Create;
80688070
FColumnOrgNames.CaseSensitive := False;
8071+
FColumnOrgNames.UseLocale := False;
80698072
FStoreResult := True;
80708073
FDBObject := nil;
80718074
FFormatSettings := DefaultFormatSettings;

0 commit comments

Comments
 (0)