Subject Re: [ib-support] Re: Interbase Transactions
Author Nando Dessena
Ali,
could you please avoid posting in HTML in this list? Thanks.

> you cant create UNIQUE index without NOT NULL expression ok?

No you can't.

> IB isnt check NOT NULL ? yes it checks !

Of course it performs the check.

> ok, when?
> after SQL parsing?
> after Trigger running ?
> after insert ?

I believe the sequence is something like:

0- a lot of things we aren't interested in right now.
1- prepare the record with the values sent from the client.
2- fire any before insert trigger passing the record in the NEW. context
variables.
3- apply the checks to the record optionally modified by the triggers.
4- if the checks pass, insert the record.

So, as I see things, you *can* pass a NULL state, provided that you have
a BEFORE INSERT trigger that will fill in a value.
If you get an errore before step 2, then you probably have some
middleware (like the BDE or the Delphi VCL) performing a chack based on
the NOT NULL definition of the field (or the state of the Required
property of a TField object, for example).
Regards
--
____
_/\/ando