Subject Re: [IBO] Setting TField.Required to False does not propagate down to TIB_Dataset
Author Nando Dessena
I wrote:

N> I am using IBO (dataset-based flavour) 4.2.Id.

N> If I create persistent (design time) fields on my TIBOQuery IBO is
N> kind enough to automatically set the Required property to True for
N> each field that is defined as NOT NULL in the underlying table. Fair
N> enough.

N> The bad news is that if I manually set the value of Required to False
N> for one of the TFields (let's say I have a before insert trigger to take care
N> of it) IBO does not seem to mirror this change to the internal
N> dataset: trying to Post without assigning a value to that field
N> results in an error thrown by TIB_Dataset.CheckRequiredFields.

N> I don't think it can be considered correct behaviour: stop me
N> from resetting Required, otherwise honor the setting.

N> So is this a bug in my version of IBO, intended behaviour (and then,
N> why) or what?

I have meanwhile observed that it also goes the other way round: if I
set Required to True on a nullable field the dataset will let a null
value slip and get to the server. In short: the TField.Required
property seems to be ignored.

Ciao
--
Nando mailto:nandod@...