Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

error in Filter in TZQuery CT LAB 8.7 3 weeks 21 hours ago #19031

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hello,

I'm trying to filter a TZQuery using the following condition:
     Name = "Brian" AND Password = 1234

However, I encountered the following error message:
     Syntax error near "AND".

I've recently upgraded from CT Lab 8.5 to CT Lab 8.7 .
Same filter in CT Lab 8.5 was working fine.

Operating System Windows 11.

Regards

 

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 3 weeks 9 hours ago #19032

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
Please, 
a test project with the problem
for out tests ?
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 2 weeks 6 days ago #19035

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi Sir,Attached is a project where you can see the error when ZQuery is filtered with two conditions.Thank you in advance for your assistance.Regards

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 2 weeks 3 days ago #19037

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi

Is there a solution for this topic?
It looks like TZQuery does no acept conditional operators anymore in a Filter property. ( AND OR, etc).
Attached is an example

Thank you in advance.

Regards

Notes: CT Lab 8.7
Operating Systrem Windows 11

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 2 weeks 2 days ago #19038

  • LuZZZZi
  • LuZZZZi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 93
  • Thank you received: 1
Hi guys,

You have defined the password of type numerical. Isn't it of type string like password = "12345". Could this solve your issue?

Cheers

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 2 weeks 20 hours ago #19041

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi guys

No, this does not resolve the issue.
It seems that the filter property of TZQuery does not support conditional operators ie.
    City = "New York" OR City = "Chicago"   < Error !  "Syntax error near "OR"."
    Fruit = "appel" AND Fruit = "orange"       < Error !  "Syntax error near "AND"."

Regards
The following user(s) said Thank You: LuZZZZi

Please Log in or Create an account to join the conversation.

Last edit: by Javier.

error in Filter in TZQuery CT LAB 8.7 6 days 1 hour ago #19046

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi PilotLogic Team

Do you think you’ll be able to fix this issue in CT Lab version 8.70?
I’d really prefer not to go back to the previous version.

Thanks so much

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 5 days 11 hours ago #19047

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
We try to find the problem,
but NO luck.
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

error in Filter in TZQuery CT LAB 8.7 5 days 3 hours ago #19048

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
Just for test
in
C:\codetyphon\typhon\components\packages_pl\pl_ZeosDBO\source\core\ZExprParser.pas

Line 255

Unmark
//    if HasMoreTokens then
//      raise CreateSyntaxErrorNear(GetToken);   


procedure TZExpressionParser.Parse(const Expression: string);
begin
  Clear;
  FExpression := Trim(Expression);
  if FExpression <> '' then begin
    TokenizeExpression;
    SyntaxAnalyse;
    // if HasMoreTokens then  //<<<==============================
    //  raise CreateSyntaxErrorNear(GetToken); //<<<==============================
  end;
end;

Please test and report
our tests... Win11 /LAB CT 8.8

 
PilotLogic Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

error in Filter in TZQuery CT LAB 8.7 3 days 2 hours ago #19051

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
I appreciate your prompt response in advance

With this modification, the error is no longer triggered.
However, the filtering logic is incorrect. When using the condition Name = 'Brian' AND Password = 989,
it still returns a result—even though the correct password for 'Brian' in the database is 1234.
This indicates that the query is not enforcing the AND condition properly.

Regards

 

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 2 days 12 hours ago #19052

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
My suggestion is to post the problem to 

Zeoslib Portal

It's base core ability of ZeosLib..

 
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

error in Filter in TZQuery CT LAB 8.7 1 day 20 hours ago #19053

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi

Could you please confirm which version of ZeosLib you're currently using in CT Lab 8.7?


Thank you

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 1 day 11 hours ago #19054

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
Yes,
(it's pl_ZeosDBO info file)

pl_ZeosDBO

Version: 8.7.1 Date: 2025-05-19 05:53
Sync Src SVN Rev : 8327  svn://svn.code.sf.net/p/zeoslib/code-0/trunk

===== MODs =================================

Zeos.inc ### at line: 665
component\ZComponentReg.pas ### at line: 66
component\ZComponentReg.pas ### at line: 87
component\ZComponentReg.pas ### at line: 95
component\ZComponentReg.pas ### at line: 124
component\ZComponentReg.pas ### at line: 200
component\ZComponentReg.pas ### at line: 209
component\ZPropertiesEditor.pas ### at line: 205
dbc\ZDbcAdo.pas ### at line: 101
dbc\ZDbcDuckDBUtils.pas ### at line: 3
dbc\ZDbcProxyStatement.pas ### at line: 138
plain\ZPlainDuckDb.pas ### at line: 64
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

error in Filter in TZQuery CT LAB 8.7 23 hours 58 minutes ago #19055

  • Javier
  • Javier's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 1
Hi
Following up

I've posted the issue on the ZeosLib platform, and they've asked me to test it in a different IDE.

I had to install Lazarus to test the latest version of ZeosLib, and everything worked without issues.

What could be going on?
Zeos team mentioned it might be the version that CodeTyphon is using.

I look forward to hearing your thoughts

Thanks and best regards

Please Log in or Create an account to join the conversation.

error in Filter in TZQuery CT LAB 8.7 11 hours 50 minutes ago #19056

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1239
  • Thank you received: 191
Thanks Sir
We read your post at Zeoslib Portal.

Please, give time to solve this problem.
 
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1