Page 1 of 1

FireDAC TFDConnection option StrsEmpty2Null in UniDAC is TCustomDataSet option.

Posted: Thu 29 Apr 2021 16:31
by Cilleruelo
Hello!
I'm migrating from FireDAC to Devart UniDAC.

I found the next problem.

In FireDAC I have StrsEmpty2Null option in the FormatOptions of my TFDConnection object.

In UniDAC I have a similar option: SetEmptyStrToNull but in this case, is in TCustomUniDataSet.Options.

This means, that I need to activate it on all the DataSets of my program. Those that create at design time and those created at run time.

Do you know how to do this globally, like if FireDAC?

Re: FireDAC TFDConnection option StrsEmpty2Null in UniDAC is TCustomDataSet option.

Posted: Fri 14 May 2021 09:04
by MaximG
The SetEmptyStrToNull option in UniDAC is implemented differently than in FireDAC. To avoid setting the option for each TUniQuery component, you may create a TUniQuery descendant with custom initialization parameters. Additionally, the edition with source code allows changing the default value of SetEmptyStrToNull as needed.