Subject Re: [IBO] IBquery - OnError raises Exception, although RaiseException:=False
Author G. Nau
Am 13 Mar 2006 um 23:06 hat Helen Borrie geschrieben:

> At 10:55 PM 13/03/2006, you wrote:
> >I'm checking for duplicate entries during the post within the query's onerror
> >event:
> >procedure TLager.IB_Query_BestellNrError(Sender: TObject;
> > const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
> > const SQLCODE: Integer; SQLMessage, SQL: TStringList;
> > var RaiseException: Boolean);
> > ...
> >This is detecting the duplicate insertion and showing the messagebox. But
> >after that I got an exception EIB_DatasetError (Record not inserted),
> >although RaiseException is set to false.
> >
> >Did I make a mistake here or how can i prevent the exception message to
> >the user?
>
> Are you testing this by running it in the
> IDE? Run the executable independently and check
> whether you still see the internal error output. I think you will not. :-)
>
> Helen

Helen,
nope ... it "Record is not inserted" message is showing up. Either within the
IDE or as stand alone application. The Exception is only showing up inside
the IDE.
I create a small sample project to verify the behavior. The "record was not
inserted" message is coming from within IBO.
I've traced it down to the ib_constant "E_Record_Not_Inserted" and that is
used within IBODataset.pas, TIBOUpdateSQL.ExecSQL

But how can I disable that message box/database error exception?

Regards
Gunther



___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de