Subject Re: [IBO] Still little problems
Author Salvatore Besso
hello Helen,

> Ok, now, what you achieve here is to force
> the current value of :DESCRIPTION into the
> VALUES() list of the insert, thereby making
> it "a value" rather than a "non-value". So -
> because you forced the value-list to take
> this "value" of <whatever> (in this case, an
> empty string), BLANKISNULL is not applied.

There is something that is not clear. BLANKISNULL is not applied
because I have set CheckRequired := False, isn't it?

> 1. Remove the XxxxxxSQL properties and let
> IBO do what you have set it up to do. Since
> there seems to be nothing special about these
> XxxxxxSQL statements, that will be your best
> remedy.

But if I remove the xxxxSQL properties, the TIB_Query becomes
read-only, isn't it? And if I remove them, how are the insert, edit
and delete statements managed? Do I have to manage them in code?

> 2. (messy) Apply some code to the BeforePost event

I have already tried this, but with FieldByName('Description').Clear,
with no luck.

> But I'm still dense as to why you want to
> defer validation until a Post fails. It
> would be better in all ways to make the
> exception occur during CheckRequired and
> have the user correct the problem *before*
> the Post attempt (a client-to-server
> operation) occurs and fails.

I prefer to have an EIB_ISC_Error that I can trap in the OnError
handler of the TIB_Query executing my own error dialog instead of the
standard IBO error dialog that is executed during CheckRequired test
because for me it is easier to localize. It's very difficult to
localize the standard IBO error dialog.

And I usually prefer to always manage by myself all errors.

Cheers
Salvatore