Page 1 of 1

Behavior of ftWideMemo Fields and Params changed from 7.1.3 to 7.3.12

Posted: Mon 05 Sep 2016 12:55
by Nilss
We recently upgraded from SDAC version 7.1.3 to 7.3.12.

Fields of type ftWideMemo seem to return an empty string for Value property. Formerly, if assigning

Code: Select all

Param.Value := Field.Value 
would not cause Param.IsNull to be False, this is now the case. When assigning

Code: Select all

Field2.Value := Field.Value
Field2.IsNull will be True. But when an update or insert statement is generated the corresponding parameter will have IsNull = False. This causes different different parameter assignment for us, instead of being NULL they are filled with empty strings.

Is this an intentional change or an error?

Re: Behavior of ftWideMemo Fields and Params changed from 7.1.3 to 7.3.12

Posted: Fri 09 Sep 2016 12:21
by azyk
Thank you for the information. We have reproduced the described behavior and are investigating it. We will inform you about the results.

Re: Behavior of ftWideMemo Fields and Params changed from 7.1.3 to 7.3.12

Posted: Mon 27 Feb 2017 13:21
by Nilss
Is there any update on this?

Re: Behavior of ftWideMemo Fields and Params changed from 7.1.3 to 7.3.12

Posted: Tue 28 Feb 2017 07:20
by ViktorV
Yes, you are right, we changed SDAC 7.3.12 behaviour. Now when setting the TMSParam.Value property to an empty string the TMSParam.IsNull property will be set to False, as in SQL Server an empty string does not equal NULL. To set the NULL value in the parameter, you should call the Clear method, like this:
MsQuery.ParamByName('myParam').Clear;
To solve the issue you can use the following code:

Code: Select all

if Field.IsNull then
  Param.Clear
else
  Param.Value := Field.Value;