Hi
I have come across a problem since upgrading from v5 to v7 of MyDAC.
If you have Default Values set to True in Options and then try to Add/Delete in the Fields Editor it raises an exception. Any attempt to work with the component after this just results in exceptions. You have to exit Delphi (which raises another exception) and restart Delphi. Set Default Values to False and everything works fine.
It never did this in v5. Have I found a bug?
Default Values
-
AndreyZ
Re: Default Values
Hello,
The point is that 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: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:
The point is that 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"';Code: Select all
initialization
DefaultExpressionOldBehavior := True;