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

Michael Van Canneyt michael at freepascal.org
Fri Aug 30 08:42:25 CEST 2013



On Fri, 30 Aug 2013, Sven Barth wrote:

> 
> Am 29.08.2013 23:04 schrieb "Michael Van Canneyt" <michael at freepascal.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).
> >
> >
> > Apparently a IBX specific extension.
> >
> > I don't see the value of this. empty and null are different things.
> 
> Not everywhere. In Oracle empty strings are Null (which is why we have special code for this situation in our business
> application).

That's a deviation from the standard. NULL means "we don't know", empty means "we know it is empty"

Michael.



More information about the fpc-pascal mailing list