Thread: XE6 - TFDTable Filter issue
 |
This question is answered.
Helpful answers available: 1.
Correct answers available: 1.
|
|
Replies:
5
-
Last Post:
May 26, 2015 1:06 AM
Last Post By: Dmitry Arefiev
|
|
|
Posts:
19
Registered:
11/26/01
|
|
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
|
|
|
Posts:
1,406
Registered:
12/7/03
|
|
Try ({fn SUBSTRING( {id COL1} , 6 , 1)} = {s 4} )
--
With best regards,
Dmitry Arefiev / FireDAC Architect
|
|
|
|
Posts:
19
Registered:
11/26/01
|
|
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
|
|
|
|
Posts:
1,406
Registered:
12/7/03
|
|
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
|
|
|
|
Posts:
19
Registered:
11/26/01
|
|
Yes,
I've the Enterprise Version of RAD Studio.
Thanks
Norbert
|
|
|
|
Posts:
1,406
Registered:
12/7/03
|
|
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)
|
|
Connect with Us