Subject | RE: [IBO] Version 4.7.16 Error Message changes? |
---|---|
Author | Paul Hope |
Post date | 2007-09-29T18:02:44Z |
Hi Ramil
Thanks for that. I really don't want to write OnError handlers if
necessary - It turns out that there is a problem with the IBO code for
TIBODataset components which Jason is looking at presently.
If I do write a handler I shall use your code ;-)
Regards
Paul
Thanks for that. I really don't want to write OnError handlers if
necessary - It turns out that there is a problem with the IBO code for
TIBODataset components which Jason is looking at presently.
If I do write a handler I shall use your code ;-)
Regards
Paul
> Hi Paul.
> I use such code in my OnError handler:
>
> //-------------------------------------------------
> var
> MyErrorMsg: String;
>
> case ERRCODE of
> ...
> isc_except: // 335544517 - User Exception
> if IBC.Characteristics.dbServer_Major_Version>1 then
> MyErrorMsg:=ErrorMessage[5] // FireBird 2 and higher
> // exception name have added in the
> // ErrorMessage at line 4
> else
> MyErrorMsg:=ErrorMessage[4];
> ...
> ...
> RaiseException:=False;
> raise Exception.Create(MyErrorMessage);
> ...
>
> //-------------------------------------------------
>
> It works fine!
>
> Best regards,
> Ramil
>
>
>
> >
> >
> >
> >
> >
> > Hi
> >
> > On storing a record Firebird generates an exception
> 'Cannot end-date
> > a Principle dentist'. This used to be reported to the user
> like that
> > ie 'Cannot end-date a Principle dentist' - now I get
> > _______________________ ISC ERROR CODE:335544517
> >
> > ISC ERROR MESSAGE:
> > exception 2
> > Cannot end-date a Principle dentist
> >
> > STATEMENT:
> > TIB_Statement:
> >
> >
> "<TApplication>,HFMMain.fDenFind.DentistForm.iboqDen.IBOqriboqDen.<TIB
> > _UpdateSQL>.<TIB_Statement>
> >
> > STATEMENT:
> > TIBOInterna.
> > _________________________
> >
> > The users will think the end of the world has come ;-)
> >
> > Is there an easy way of switching this behaviour off? I've tried
> > using OnError to present my message and setting RaiseException to
> > false but the message is then followed by a 'Record not
> located for
> > update' error.
> >
> > If it isnt possible already I think it would be a great idea if a
> > global option at connection or session level could be used
> such that
> > only the error message is presented and not the code or
> anything else.
> >
> > Regards
> > Paul
> >
> >
> >