Page 1 of 1

Problem with parameters after 6.2.7 update

Posted: Sun 13 Sep 2015 15:57
by therat
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.

Re: Problem with parameters after 6.2.7 update

Posted: Mon 14 Sep 2015 12:38
by AlexP
Hello,

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

Re: Problem with parameters after 6.2.7 update

Posted: Fri 13 Nov 2015 16:22
by otomazeli
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

Re: Problem with parameters after 6.2.7 update

Posted: Fri 13 Nov 2015 17:10
by otomazeli
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!

Re: Problem with parameters after 6.2.7 update

Posted: Mon 16 Nov 2015 11:25
by ViktorV
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.