最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

delphi - How to rebuild FireDAC? - Stack Overflow

programmeradmin1浏览0评论

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).

发布评论

评论列表(0)

  1. 暂无评论