Problem with parameters after 6.2.7 update

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
therat
Posts: 5
Joined: Wed 12 Jan 2011 16:38

Problem with parameters after 6.2.7 update

Post by therat » Sun 13 Sep 2015 15:57

Hi,

My app was working fine with 6.1.6 (and many versions since 5.x) until I updated to 6.2.7 (Delphi XE6)

I'm using conditional macros in my queries, as shown in this example

Code: Select all

SELECT COUNT(*) AS RECORD_COUNT
FROM   FINANCIAL_CODES F
WHERE  F.DATASET_ID = :DATASET_ID
{IF FILTERING}
  AND    F.ENGLISH_DESCRIPTION ILIKE :ENGLISH_DESCRIPTION
  AND    F.AFRIKAANS_DESCRIPTION ILIKE :AFRIKAANS_DESCRIPTION
  {IF EXCLUDEDEBITS}
    AND    F.CODE_TYPE <> :DEBIT_CODE_TYPE
  {ENDIF}
  {IF EXCLUDECREDITS}
    AND    F.CODE_TYPE <> :CREDIT_CODE_TYPE
  {ENDIF}
{ENDIF}
I add the macros "FILTERING" and "EXCLUDEDEBITS" and then assign the query to the SQL.Text property. The problem is that I get "Parameter not found" error when setting a value for "ENGLISH_DESCRIPTION".

If I skip the parameter setting part of the code, I get this error when opening the query syntax error at or near ":"

This is existing code that has worked all the while until 6.2.7.

Please investigate and see if you can shed any light on this.

Thank you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Problem with parameters after 6.2.7 update

Post by AlexP » Mon 14 Sep 2015 12:38

Hello,

Thank you for the sample, we have reproduced the described case, and will fix it as soon as possible.

otomazeli
Posts: 10
Joined: Mon 22 Feb 2010 18:32

Re: Problem with parameters after 6.2.7 update

Post by otomazeli » Fri 13 Nov 2015 16:22

I'm having the same issue with
MySql Server version: 5.6.23-log
Client version: 8.0.0 Direct
Unidac 6.2.8 for Delphi 6

I have a master detail and the fields in master detail doesn't show in the parameters anymore. it does for some tables but not for others....

Any Idea why? I'm using UniConnection -> UniQuery1 -> DataSource -> UniQuery2 (MasterSource=DataSource. MasterFields=MYID, DetailFields=MYID)

Thanks

otomazeli
Posts: 10
Joined: Mon 22 Feb 2010 18:32

Re: Problem with parameters after 6.2.7 update

Post by otomazeli » Fri 13 Nov 2015 17:10

I have just found why this is happening
if you set a master detail set your master field and detail field and go to parameters you will see it.
then you go back in options and activate LocalMasterDetail and go back to parameters the parameter is gone. this cause the table to open and refresh really slow. Performance impact it's 9 on 10. Big issue!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problem with parameters after 6.2.7 update

Post by ViktorV » Mon 16 Nov 2015 11:25

Unfortunately, we can't reproduce the issue. To investigate this behavior of UniDAC, please send to viktorv*devart*com a small sample to demonstrate the issue, including a script for creation and filling in the test database object.

Post Reply