<div dir="ltr">2013/8/29 Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


On Thu, 29 Aug 2013, silvioprog wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Other interesting feature is the property EmptyAsNull:<br>
<br>
<a href="http://docwiki.embarcadero.com/VCL/XE/en/IBCustomDataSet.TIBStringField.EmptyAsNull" target="_blank">http://docwiki.embarcadero.<u></u>com/VCL/XE/en/IBCustomDataSet.<u></u>TIBStringField.EmptyAsNull</a><br>
<br>
It tests if field (ftString) is empty (f = ''), if yes, it set the field value to null (f.Clear).<br>
</blockquote>
<br>
Apparently a IBX specific extension.<br>
<br>
I don't see the value of this. empty and null are different things.<br>
<br>
Michael.</blockquote></div><div><br></div><div>Some Delphi components (Zeos, JvDBEdit) have this option.</div><div><br></div><div>Assuming this table:</div><div><br></div><div>test</div><div>  id integer,</div><div>  name varchar(10) not null unique</div>

<div><br></div><div>You can:</div><div><br></div><div>id|name</div><div>1| <null></div><div>2| <null><br></div><div><br></div><div>But:</div><div><br></div><div>1| <empty><br></div><div>2| <empty> << error, unique key<br>

</div><div><br></div><div>I implemented "EmptyAsNull" directly in my project. It is very useful. In my webpages, if the user clear a input, I send a null value to the table.</div><div><br></div>-- <br>Silvio Clécio<br>

My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>