Subject [IBO] IBOQuery and Abort in OnValidate event
Author Petr Hartman
Hi all,

I am trying to work with IBO and I have a problem.

Example:

procedure TForm1.IBOQuery1NewRecord(DataSet: TDataSet);
begin
IBOQuery1Poj.Value := '111';
end;

procedure TForm1.IBOQuery1PojValidate(Sender: TField);
begin
if (IBOQuery1Poj.Value = '111') then
raise Exception.Create('Error');
end;

When I add a new record, OnValidate event fires, the value '111' is not stored into the new record,
but the new record remains in IBOQuery's buffer. When I skip to the next record and call Edit,
I get error message like this:

IBOQuery1: Dataset not in edit or insert mode.

With standard TQuery everything is ok (new record isn't added).

Thank you for your answer and sorry for my bad english.

Petr Hartman