Page 1 of 1

Error when append record with DefaultExpression value

Posted: Wed 24 Sep 2008 14:02
by Wilton
Hi,

Since the 5.20.1.15 version that I try to use the updates, without success, I have some types of error and from the 5.50.0.36 version one that I do not have a workaround, when I insert a new record in a table with fields have values in the DefaultExpression property, I receive a error message, because the method BeforeExecute is run with a wrong values
looks like this:

Code: Select all

SELECT AN, N, N
Sorry, but 'AN','N' and 'N' are a DefaultExpression for a 3 differents fields.

Waiting for a answer, I return to version 5.20.1.14, this works fine.

Tks,

Nearly same problem on Append

Posted: Thu 25 Sep 2008 18:33
by patyi
Hi all !

I have the same problem, except my last working version is
5.20.1.15 D7. With newer versions on Append method I get an
error abaut invalid variant conversion.

D7, WinXP

Posted: Mon 29 Sep 2008 09:09
by Dimon
This behaviour was changed in version 5.50.0.34 because of improvement of support of default field values.
In newer versions default values should be quoted, like this:

Code: Select all

  Field.DefaultExpression := '"value"';
To restore old behavior, set the DefaultExpressionOldBehavior variable to True. This varible is declared in the MemDS unit.

Posted: Wed 08 Oct 2008 15:36
by Wilton
Hi, Dimon

Your information solved my problems, I'm using the version 5.50.0.39 and my app works fine.

Tks,