[fpc-pascal] Re: How to clear the value of a field in a table using parameters?

Reinier Olislagers reinierolislagers at gmail.com
Fri Aug 30 08:33:37 CEST 2013


On 30/08/2013 07:44, Sven Barth wrote:
> Am 29.08.2013 23:04 schrieb "Michael Van Canneyt"
> <michael-y8GAwIkqPAJpn7uciFS/BA at public.gmane.org
> <mailto:michael-y8GAwIkqPAJpn7uciFS/BA at public.gmane.org>>:
>> On Thu, 29 Aug 2013, silvioprog wrote:
>>> Other interesting feature is the property EmptyAsNull:
> http://docwiki.embarcadero.com/VCL/XE/en/IBCustomDataSet.TIBStringField.EmptyAsNull
>>> It tests if field (ftString) is empty (f = ''), if yes, it set the
> field value to null (f.Clear).
>> I don't see the value of this. empty and null are different things.

Neither do I.

> Not everywhere. In Oracle empty strings are Null

Yes, apparently Oracle breaks the SQL standard here.

If you want functionality like this why not specify your column DEFAULT
NULL and just not insert data into that column (yes, you'd still have to
UPDATE to NULL sometimes, but IMO it shows much more clearly you're
explicitly saying "the value of this field is unknown").

I suppose it also boils to how much one has been indoctrinated by
relational database theory :)



More information about the fpc-pascal mailing list