Page 1 of 1

Unclear error message

Posted: Tue 01 Mar 2016 09:00
by michaschumann
I am working on an application with IBDAC where a new record is appended to a table and the on post an exception was thrown that statet "Operarion aborted".

After debugging into the heart of the matter I found out that the error was caused by a primary key violation that raises the correct exception in

Code: Select all

  procedure TDataSet.CheckRequiredFields;
var
  I: Integer;
begin
  for I := 0 to FFields.Count - 1 do
 [b]   if FFields[I].Required and not FFields[I].ReadOnly and (FFields[I].FieldKind = fkData) and FFields[I].IsNull then[/b]
    begin
      FFields[I].FocusControl;
      DatabaseErrorFmt(SFieldRequired, [FFields[I].DisplayName]);
    end;
end;
in Data.DB. But the exception I get is "Operation aborted". This seems to be related to IBDAC as with UNIDAC I got the correct exception cause.

Re: Unclear error message

Posted: Wed 02 Mar 2016 11:36
by ViktorV
Unfortunately, we couldn't reproduce the issue. In order to investigate the issue, please compose and send to viktorv*devart*com a small sample demonstrating the issue, including scripts for creating database objects. Also, specify the exact version of your Firebird server and client library.

Re: Unclear error message

Posted: Wed 02 Mar 2016 12:26
by michaschumann
Meanwhile I changed the complete module and work with components on data modules - the error does not occure then. Perhaps it was caused by the fact that I created the IBC objects in code.

Re: Unclear error message

Posted: Wed 02 Mar 2016 13:40
by ViktorV
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.