Subject | Re: [IBO] ICS error |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-01-09T02:35:01Z |
At 03:24 PM 08-01-02 -0800, Daniel Bertin wrote:
I saw your earlier message and immediately added "Trapping errors" to my list of Tech Info sheet projects. I think I should do this ASAP.
In the meantime, look at how you can use a TIB_SessionProps to help you extract information from a database error event. Particularly look at the structure of the TIB_ErrorEvent which is loaded with the stuff that comes through to the client from the database when an error event occurs (see the OnError event of TIB_SessionProps).
TIB_ErrorEvent = Procedure(Sender: TObject;
const ERRCODE: longint;
ErrorMessage,
ErrorCodes: TStringList;
const SQLCODE: longint;
SQLMessage,
SQL: TStringList;
var RaiseException: boolean
) of object;
These arguments are all surfaced as properties of the EIB_ISCError class (or EIBO_ISCError in the case of the TDataset-compatible components).
You would write a handler for OnError that reads the parts of this structure that you are interested it and provides sets of handling behaviour for any that you know are likely to occur.
To find out the errorcodes and SQLCODES, refer to the InterBase Language Reference manual (LangRef.pdf) which has a whole chapter, including a complete reference list.
At least it might get you going on what to look at, so you know what questions to ask next and I know what issues will be important to cover in the TI sheet. :)
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com
>Hi all,Daniel,
>I need some help here, I know I'm a newbie , I purchased the IBO manual, I
>looked at the samples, into the help file and I cannot find any information
>on how to structure my code to capture these ISC errors.
>
>could someone point me in the right direction, i'm wanting information
>where to put the code , in the onerror event of the connection, onposterror
>event of the table ,is there any documentation where should I.
I saw your earlier message and immediately added "Trapping errors" to my list of Tech Info sheet projects. I think I should do this ASAP.
In the meantime, look at how you can use a TIB_SessionProps to help you extract information from a database error event. Particularly look at the structure of the TIB_ErrorEvent which is loaded with the stuff that comes through to the client from the database when an error event occurs (see the OnError event of TIB_SessionProps).
TIB_ErrorEvent = Procedure(Sender: TObject;
const ERRCODE: longint;
ErrorMessage,
ErrorCodes: TStringList;
const SQLCODE: longint;
SQLMessage,
SQL: TStringList;
var RaiseException: boolean
) of object;
These arguments are all surfaced as properties of the EIB_ISCError class (or EIBO_ISCError in the case of the TDataset-compatible components).
You would write a handler for OnError that reads the parts of this structure that you are interested it and provides sets of handling behaviour for any that you know are likely to occur.
To find out the errorcodes and SQLCODES, refer to the InterBase Language Reference manual (LangRef.pdf) which has a whole chapter, including a complete reference list.
At least it might get you going on what to look at, so you know what questions to ask next and I know what issues will be important to cover in the TI sheet. :)
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com