FireDAC TFDConnection option StrsEmpty2Null in UniDAC is TCustomDataSet option.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Cilleruelo
Posts: 18
Joined: Tue 09 Mar 2021 16:01

FireDAC TFDConnection option StrsEmpty2Null in UniDAC is TCustomDataSet option.

Post by Cilleruelo » Thu 29 Apr 2021 16:31

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?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Fri 14 May 2021 09:04

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.

Post Reply