Subject RE: [IBO] state
Author Paul Vinkenoog
Hi Gediminas,

> is dataset must be in edit state in order to let enter text in
> TIB_Edit?

Yes (or in dssSearch or dssInsert), but if the AutoEdit/AutoInsert
property of the DataSource (not the DataSet) is true - which is the
default -, the DataSet will enter the appropriate state automatically
as soon as you start typing. Easy!

> also got error, that there is missing field then posting: ID is
> missing, but there is a before insert trigger NEW."ID" = gen_id(
> "ID_GEN" , 1 ) what is missing here? i thought, that trigger will
> insert needed ID value when posting :-/

IBO knows that ID is a required field; and it checks that required
fields aren't null _before_ posting anything to the server.

Best thing you can do here is set this GeneratorLink in the query:

ID=ID_GEN

IBO will then fetch the value automatically from the generator. But
beware! Change your before insert trigger to:

if ( New.ID is null ) then New.ID = gen_id( ID_GEN, 1 );

Otherwise the ID will be overwritten and the ID that IBO thinks
belongs to the record has become invalid.


Greetings,
Paul Vinkenoog