From 97b171d739f460eb4d465790c82913dfd3a60681 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Fri, 25 Mar 2016 11:44:54 +0000 Subject: [PATCH] RxFPC:TZeosDataSetSortEngine - use IsValidIdent git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4597 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/trunk/exsortzeos.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/rx/trunk/exsortzeos.pas b/components/rx/trunk/exsortzeos.pas index 9f9f31235..1c138998a 100644 --- a/components/rx/trunk/exsortzeos.pas +++ b/components/rx/trunk/exsortzeos.pas @@ -54,9 +54,10 @@ uses ZDbcIntfs, ZVariant; function FixFieldName(S:string):string;inline; begin - if Pos(' ', S)>0 then - S:='"'+S+'"'; - Result:=S; + if not IsValidIdent(S) then + Result:='"'+S+'"' + else + Result:=S; end; procedure TZeosDataSetSortEngine.Sort(FieldName: string; ADataSet: TDataSet;