Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: XE6 - TFDTable Filter issue


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 5 - Last Post: May 26, 2015 1:06 AM Last Post By: Dmitry Arefiev
Norbert Meier

Posts: 19
Registered: 11/26/01
XE6 - TFDTable Filter issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 19, 2015 3:05 AM
Hello,

I'm using a Firebird database and have a problem using TFDTable filter.
I'm tying to set a filter on a varchar column like

(SUBSTRING( {id COL1} , 6 , 1) = {s 4} )

BTW: That filter works fine for TFDQuery!!

I get always the error:
[FireDAC][Phys][FB]Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, column 25
,'

which means that the comma after {id COL1} is wrong.

If try the Firebird syntax

(SUBSTRING( {id COL1} from 6 for 1) = {s 4} )

I get the error:

[FireDAC][Stan][Eval]-111,
')' or ',' expected, but ['from'] found

Does anybody know how to solve this issue?

Thanks
Norbert
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: XE6 - TFDTable Filter issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 19, 2015 9:27 PM   in response to: Norbert Meier in response to: Norbert Meier
Try ({fn SUBSTRING( {id COL1} , 6 , 1)} = {s 4} )

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Norbert Meier

Posts: 19
Registered: 11/26/01
Re: XE6 - TFDTable Filter issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 19, 2015 11:09 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Hi Dimitry,

using the filter ({fn SUBSTRING( {id COL1}, 6, 1)} = {s 4} )

results in:

('[FireDAC][Stan][Eval]-100. Spalte oder Funktion [SUBSTRING( {id COL1] nicht gefunden. Hinweis: Fügen Sie der uses-Klausel FireDAC.Stan.ExprFuncs hinzu, wenn der Name ein Funktionsname ist', 0, nil, nil, False, 100, '')

It seems that the first closing curly bracket is taken for "fn SBSTRING" which is wrong, because it belongs to {id COL1}.
Adding FireDAC.Stan.ExprFuncs to the uses clause doesn't help.

Regards
Norbert
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: XE6 - TFDTable Filter issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 20, 2015 9:49 AM   in response to: Norbert Meier in response to: Norbert Meier
We checked - there is a bug. So, such construction will fail with syntax error.
If you have Enterprise or a higher RAD Studio, then you have FireDAC sources.
If so, I can provide you a patch.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Norbert Meier

Posts: 19
Registered: 11/26/01
Re: XE6 - TFDTable Filter issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 26, 2015 12:18 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Yes,

I've the Enterprise Version of RAD Studio.

Thanks
Norbert
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: XE6 - TFDTable Filter issue
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 26, 2015 1:06 AM   in response to: Norbert Meier in response to: Norbert Meier
Ok. The patch is posted to:
https://forums.embarcadero.com/thread.jspa?threadID=115514

To apply:
* use one of the tools to apply the patch to FireDAC sources or
do that by hands. Actually only FireDAC.Stan.Expr.pas is modified.
* include path to FireDAC sources into IDE Library Path.

Note, this will affect only run-time, not design-time.

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02