Page 1 of 1
SQL Server provider and Null string
Posted: Sat 29 Nov 2008 16:27
by burdian
Hi,
Delphi 2007, UniDAC 1.20.0.13.
When I edit string field via, for example, DBEdit control and delete value, SQL Server post to database '' not null value.
Oracle and Interbase providers post correct null value!
TIA and Best regards
Branko
Posted: Mon 01 Dec 2008 08:44
by Plash
When you assign an empty string to a field, this empty string is posted to the database. When you assign Null to a field, Null is posted to the database. This is the correct behaviour.
There was a bug in the InterBase provider. We'll fix this bug in the next UniDAC build. So that the InterBase provider will also post an empty string.
Oracle server does not distinguish NULL and empty string. When you insert an empty string to the Oracle database it is always replaced with NULL.
Posted: Mon 01 Dec 2008 10:03
by burdian
Then there is no possibility to assign null value thru DB Controls?
Perhaps Option.EmptyStringToNull?
Best regards
Branko
Posted: Tue 02 Dec 2008 08:06
by Plash
UniDAC does not have such feature.
Posted: Tue 02 Dec 2008 10:05
by burdian
Yes, I know, this is just my suggestion.
Best regards
Branko
Posted: Wed 03 Dec 2008 08:28
by Plash
We are planning to add such option in one of the next UniDAC builds.