Subject Re: [ib-support] Default Question
Author Doug Chamberlin
At 2/8/2001 11:30 AM (Thursday), Robert F. Tulloch wrote:
> Supposedly. But, when I stepped through the code, after clearing the
> text value was
>null but it executed the If('') then '0' and set the text to '0'. So, it
>must have
>reconciled that itself?

If you all TField.Clear to set a field to null and then ask for the same
field TField.AsString value you will get ''. Therefore, in the Delphi
client your code works.

If you really wanted to test for NULL following the TField.Clear call you
would use TField.IsNull before setting the 0 value.

I think Helen was thinking about the server handling a value set via
TField.AsString := '' differently from a value of TField.Clear when that
value reached the server. I think most of us do this substitution in
triggers, which explains her concern that the field value when it gets to
the server must be checked for both NULL and ''.