Properties DefaultExpression

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
leufmt
Posts: 2
Joined: Mon 07 Oct 2013 14:44

Properties DefaultExpression

Post by leufmt » Mon 07 Oct 2013 14:53

Bom dia.
Hoje atualizei o componente para a versão 8.1.4.
Desde então vem dando o erro: #42S22Unknown column 'BRASIL' in 'field list'.
Este erro dá nos campos que tem a Properties DefaultExpression preenchida.

Como posso resolver isto?

Good day.
Today updated the component to version 8.1.4.
Since then is giving the error: # 42S22Unknown column 'BRASIL' in 'field list'.
This error gives the fields that have the Properties DefaultExpression filled.

How can I fix this?

VladimirK
Devart Team
Posts: 16
Joined: Tue 24 Sep 2013 09:19

Re: Properties DefaultExpression

Post by VladimirK » Wed 09 Oct 2013 07:51

The behaviour of working with default field values was changed in MyDAC version 5.50.0.34. This was done to improve the support of default field values. In newer MyDAC versions default field values should be quoted, like this:

Code: Select all

    Field.DefaultExpression := '"value"';
If you want to restore the old behaviour, you should set the DefaultExpressionOldBehavior variable (it is declared in the MemDS unit) to True. For this, you should use the following code in one of the units of your application:

Code: Select all

    initialization
      DefaultExpressionOldBehavior := True;

leufmt
Posts: 2
Joined: Mon 07 Oct 2013 14:44

Re: Properties DefaultExpression

Post by leufmt » Thu 10 Oct 2013 21:32

Muito obrigado. Resolvi meu problema

Thank you. Solved my problem

VladimirK
Devart Team
Posts: 16
Joined: Tue 24 Sep 2013 09:19

Re: Properties DefaultExpression

Post by VladimirK » Fri 11 Oct 2013 12:45

You are welcome. Feel free to contact us if you have any further questions about MyDAC.

Post Reply