<div dir="ltr">2013/8/30 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, 30 Aug 2013, silvioprog wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013/8/29 Michael Van Canneyt <<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>><br>
On Thu, 29 Aug 2013, silvioprog wrote:<br>
<br>
<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>
<br>
<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.<br>
<br>
<br>
Some Delphi components (Zeos, JvDBEdit) have this option.<br>
<br>
Assuming this table:<br>
<br>
test<br>
id integer,<br>
name varchar(10) not null unique<br>
<br>
You can:<br>
<br>
id|name<br>
1| <null><br>
2| <null><br>
<br>
But:<br>
<br>
1| <empty><br>
2| <empty> << error, unique key<br>
<br>
I implemented "EmptyAsNull" directly in my project. It is very useful. In my webpages, if the user clear a input, I send a<br>
null value to the table.<br>
</blockquote>
<br>
Good for you :)<span class="HOEnZb"><font color="#888888"><br>
<br>
Michael.</font></span></blockquote></div><div><br></div><div>hehe... :D</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>