Subject | Re: [IBO] TIB_Query, OnError and RaiseException |
---|---|
Author | tickerboo2002 <support@tickerboo.com> |
Post date | 2002-12-19T16:52:42Z |
Thanks for that,
I was a bit perplexed that it would throw a 335544466 exception, but
when I added an OnError method it threw a different one. I'll give
your method a try.
_____
_____
I was a bit perplexed that it would throw a 335544466 exception, but
when I added an OnError method it threw a different one. I'll give
your method a try.
> Hi!Here's what
>
> I can't say anything on the best way of handling the situation.
> I did and how I figured...handler
>
> When I set RaiseException to false the processing after the OnError
> continues. In our case it looks like it should not continue. Itseems
> processing after tries to fulfill the deletion (or whateveroperation). So I
> did:table "REL_NAME"
>
> case ERRCODE of:
>
> ...
> ...
>
> // violation of FOREIGN KEY constraint "FK_NAME" on
> 335544466:ErrorMessage,
> begin
> NotificationToolWin.AddEISCErrorMessage(ERRCODE,
> 'FOREIGN KEY Violation');exhibit the
> RaiseException := false;
> raise EAbort.Create('');
> end;
>
> This is not the exact error you are talking about, but it should
> same behaviour. Seems to do what I want it to do (this is pascal -you
> translate).message box).
>
> After the begin the first row is my own error processing (your
> The second line you'll recognize and the third line continues theexcption
> path in execution without making further noise.here :)
>
> Hope this helps and please comment if I'm doing something bad
>user
> /Dany
>
> <support@t...> skrev i meddelandet news:atq8de+7pk0@e...
> > Hello
> >
> > I'm just learning about IB exceptions and trying to give a more
> > friendly response to the user.constraint,
> >
> > I have a dialog containing a TIB_Grid and an Updatebar. When the
> > user tries to delete an entry which is protected by an FK
> > my TIB_Query.OnError shows a messagebox and setsRaiseException=false.
> > (This is immediately after clicking delete and before anytransaction
> > methods are called)does
> >
> > However, my main exception handler (Application->OnException) then
> > catches an exception 'Record was not located'. This exception,
> > not pass through TIBQuery.OnError. If I use a IB_SessionProp,this
> > does not catch the exception either.______________________________________________________________________
> >
> > Can anyone tell me what I'm doing wrong, or have hints on the best
> > Exceptions handling model.
> >
> > Thanks
> >
> > David
> >
> > Using FB1, IBO4.2H, BCB5, Win2k
> >
> >
> >
> >
> >
> >
>
_____
> > IB Objects - direct, complete, custom connectivity to Firebird or______________________________________________________________________
> InterBase
> > without the need for BDE, ODBC or any other layer.
> >
>
_____
> > http://www.ibobjects.com - your IBO community resource for TechInfo
> papers,http://docs.yahoo.com/info/terms/
> > keyword-searchable FAQ, community code contributions and more !
> >
> > Your use of Yahoo! Groups is subject to
> >
> >
> >