Subject | Re: [IBO] ERRCODE = 100. What does it mean? |
---|---|
Author | Helen Borrie |
Post date | 2004-06-06T23:27:28Z |
At 10:44 PM 6/06/2004 +0000, you wrote:
order in which I've output that errorcode doc, which was built directly
using a SP operating on the internal MSG.GDB). The status array *usually*
returns both the SQLCODE and the GDSCODE. I'm almost certain that, by
checking "Errors Only" in the ib_monitor, you turn off everything except
the GDSCODE.
You can get a very good handle on the contents and meaning of the status
array by studying the help text for TIB_ISCError and TIB_Session's OnError
event. Once you grokk the exception process, it becomes an extremely
powerful tool.
an exception "in reverse": in order to verify that the user is behaving
nicely, he calls a request that will throw an exception if the user is
doing the right thing, and does not throw one if the user is doing the
wrong thing (using the DSQL utility for multi-row selects). The
application watches for the exception and, if it doesn't occur, then the
application will throw its own exception.
In an application you wouldn't be using the IB_Monitor except at design
time. But the monitor output is altogether the wrong place for your apps
to be looking for exception information. If a database exception occurs,
then there is an ISC_Error structure available. You don't get an ISC_Error
if there was no error. The exceptions are listed in reverse order of
occurrence, so the one that finally caused the engine to barf is the first
in the list.
Helen
>You forgot to mention (the in my opinion best article available):Actually, it's my article. :-)
>Jason's ti_ErrorHandling.pdf.
> >From what I've read now I conclude that ERRCODE is SQLCODE forYes and no. Every GDSCODE is grouped under an SQLCODE (and that's the
>non-errors, and GDSCODE (Interbase numbers) for "real" errors. Right?
order in which I've output that errorcode doc, which was built directly
using a SP operating on the internal MSG.GDB). The status array *usually*
returns both the SQLCODE and the GDSCODE. I'm almost certain that, by
checking "Errors Only" in the ib_monitor, you turn off everything except
the GDSCODE.
You can get a very good handle on the contents and meaning of the status
array by studying the help text for TIB_ISCError and TIB_Session's OnError
event. Once you grokk the exception process, it becomes an extremely
powerful tool.
>Thus, if I use IB_MONITOR output strings for error monitoring thenIt depends what you are looking for. Jason's DSQL utility in IB_SQL uses
>I must ignore ERRCODE <= 101?
an exception "in reverse": in order to verify that the user is behaving
nicely, he calls a request that will throw an exception if the user is
doing the right thing, and does not throw one if the user is doing the
wrong thing (using the DSQL utility for multi-row selects). The
application watches for the exception and, if it doesn't occur, then the
application will throw its own exception.
In an application you wouldn't be using the IB_Monitor except at design
time. But the monitor output is altogether the wrong place for your apps
to be looking for exception information. If a database exception occurs,
then there is an ISC_Error structure available. You don't get an ISC_Error
if there was no error. The exceptions are listed in reverse order of
occurrence, so the one that finally caused the engine to barf is the first
in the list.
Helen