Reputation: 21
I have implemented my own TFDDataSet
component in Delphi 12.2.
Everything is OK, but I have a problem with SQL Server if there are column names in the local language.
I have an error as soon as an automatic update is called in the DBGrid:
COUNT field incorrect or syntax error
I have done some work to find out the reason. Here it is:
FireDAC.Stan.Param.pas
:
function TFDParams.FindParam(const AValue: String): TFDParam;
var
i: Integer;
begin
for i := 0 to Count - 1 do begin
Result := Items[i];
if {$IFDEF FireDAC_NOLOCALE_META} CompareText {$ELSE} AnsiCompareText {$ENDIF}
(Result.Name, AValue) = 0 then
Exit;
end;
Result := nil;
end;
For some reason, the FieldName
(derived from the parameter name, TFDParams.Name
) is 'Nameö'
, but AValue
is 'NameÖ'
(derived from TFDParams.Markers
). And CompareText()
fails, as 'Nameö'
is not equal to 'NameÖ'
.
The only way to make this function work is to use AnsiCompareText()
. So, I have changed Firedac.inc
so that the directive FireDAC_NOLOCALE_META
is commented. But nothing has changed, I think it is not enough.
I think I have to rebuild either the .dcu
(FireDAC.Stan.Param.dcu
), or even the full library / package (all Firedac290*.bpl
files).
But how? I have no project files (I have Delphi with FireDAC sources, Enterprise version).
Upvotes: 0
Views: 94