Subject | Re: [IBO] IBquery - OnError raises Exception, although RaiseException:=False |
---|---|
Author | Helen Borrie |
Post date | 2006-03-13T12:06:45Z |
At 10:55 PM 13/03/2006, you wrote:
IDE? Run the executable independently and check
whether you still see the internal error output. I think you will not. :-)
Helen
>I'm checking for duplicate entries during the post within the query's onerrorAre you testing this by running it in the
>event:
>procedure TLager.IB_Query_BestellNrError(Sender: TObject;
> const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
> const SQLCODE: Integer; SQLMessage, SQL: TStringList;
> var RaiseException: Boolean);
>begin
> inherited;
> if Pos('duplicate value',Errormessage.Text)>0 then
> Begin
> if Pos('IX_ZUSBESTELLNR',errormessage.text)>0 then
> Begin
> RaiseException:=False;
> DBGrid_BestellNr.SetFocus;
> BvOMessageBox('Die zusätzliche Bestell-Nr., die Sie eingegeben
>haben, gibt es bereits. Bitte prüfen und korrigieren Sie das.', 'Doppelte
>Zusatz-Bestell-Nr.', MB_OK);
> End;
> End;
>end;
>
>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?
IDE? Run the executable independently and check
whether you still see the internal error output. I think you will not. :-)
Helen