Subject Inserting Records using IB_Controls: Field x is a Required Field
Author
Good morning all

I'm new to IBObjects.

Getting a recurring problem with some tables (only some, not all) when inserting records using an Update Bar and a series of IB_Edit controls on a form.  When I click Post I get error:-

Project blah raise exception class EIB_DatabasetError with message 'x is a required field'

If I put the same data into a series of IB_Query.sql.add( insert statements, no errors.

Things I've tried:-

Hard-wiring the data into IB_Query events NewRecord, BeforePost, AfterInsert, BeforeInsert, AfterPost in various combinations.

Sometimes I've had the situation where the first record posts fine, but adding another straight after fails.  So on that basis I re-prepared the query, but that is not consistent either.

Current test I've done is to put a Query, a Datasource on a form, several Edit controls, an Updatebar.  No code in any of the Query events, and the problem is reproducible.  The IBConnection and IBTransaction components are on another form, and have been working with lots of other queries without problem.

The fields are Primary Key fields - there are other tables hooking into these keys.

The fields with the problem are defined using domains - nothing fancy apart from Charset UTF8,   This UTF8 seems to be the recurrent theme whenever this problem has arisen.  I saw somewhere that there was a problem with certain Firebird versions.  The engine I'm using is
Firebird 2.5.2.26540

No server-side frills, no generators, no triggers.


I've just gone into the properties of the field on the IB_Query and turned off the Required tick.  Still no joy.


Anyone have any other suggestions?