Subject Re: [IBO] EIB_ISCError
Author Geoff Worboys
> When I look to the properties of EIB_ISCError, I find a
> property ErrorMessage, that is a Stringlist. When I
> want to access just the message of the error, instead
> of the whole message, I use ErrorMessage[4]. Is that
> correct ? For every ISC error ?

If you are only talking about procedure/trigger exceptions then yes
the 5th line is what you need. But this does not extend to the other
ISC errors.

For example if you logon with a bad password the message is in line 4
(ErrorMessage[3]). In some cases - such as DSQL Errors - the most
useful details exist in lines 6 and 7.

To achieve just the message it is safe to always ingore the first 3
lines, these were added by IBO anyway. The remaining text may or may
not useful.

NOTE: You may have to use the AdjustLinesBreaks function to get
reliable results (see the EIB_ISCError.ShowDialog function in

I suggest that you centralise any work you do with this into a
function along the lines of...

function ISCErrorMessageText(const E: EIB_ISCError): string;
if E.ErrCode = ????
Result = E.ErrorMessage[n]

You may find that some types of messages need you to concatenate
multiple lines together to get everything you require.

I have been contemplating trying to write a function like this to
distribute with IBO, the problem is that I have no idea how much the
layout and formatting of messagees may change from language to

I have also contemplated adjusting the error handling to extract the
variable information for independant formatting and use at the client.
But time is short.

For the moment we are stuck with just doing the best we can with what
we have been given.


Geoff Worboys
Telesis Computing