[FireDAC][Stan][Eval]-107. Invalid character found [ 拼音码 like '%A%' ]

英文字段名称过滤正常

汉字字段名过滤报错。

莫非不支持汉字字段名过滤?

 

 

过滤用的是d:\program files (x86)\embarcadero\studio\15.0\source\data\firedac\FireDAC.DatS.pas 的 TFDDatSView

procedure TFDDatSView.SetActive(const AValue: Boolean);

 

再搞不定自己写FilterRecord事件

ADQuery1.OnFilterRecord := Form1FilterRecord;
ADQuery1.Filtered := True;

procedure TForm1.Form1FilterRecord(DataSet: TDataSet; var Accept: Boolean);
var
  iOrderID: Integer;
begin
  iOrderID := DataSet.FieldByName('OrderID').AsInteger;
  Accept := (iOrderID = 10150) or (iOrderID = 10151) or (iOrderID = 10152);
Accept:= (Pos('N', DataSet.FieldByName('拼音码').AsString) > 0) then end;

Filter := '[拼音码]='+QuotedStr('n'); //加上[]就好啦
posted on 2015-03-25 10:07  lypzxy  阅读(542)  评论(0编辑  收藏  举报