Subject Re: [ib-support] ISC Error codes (REPOST)
Author Helen Borrie
At 11:22 PM 16-09-02 +0000, you wrote:
>Hi there,
>I posted this question about a week ago, with no reply.
>Just trying again incase it was missed.
>I would like some clarification on the error codes if possible, as
>the same error code is used to indicate:
>1- that the file does not exist; and
>2- that the file DOES exist (when trying to create it again)
>as these are both I/O errors, and the I/O error code is 335544344.
>I need to separate these two errors, so I have captured all error
>codes and messages.
>File does not exist err codes:
>13130828 <--*
>File already exists err codes:
>13129584 <--*
>I am assuming that the indicated codes (<--*) above are what
>these two errors. Am I correct?
>Can I merely look for the code on the third line of the err. codes
>to determine which kind of I/O error?
>Also, what does the '2' refer to?
>And why is there an additional '2' in the 'not exist' err. codes?
>Where can I find more info on these '3rd line' codes?
>I know the error Messages clearly state these diffs, but I think
>it's more efficient if I can determine this info from the codes.
>Thanks for any information, and sorry for the many questions.

I started to answer this question by studying the format of the error
status vector (see the API Guide) but, with my own time limited, I have to
suggest that you explore those docs yourself to work out the significance
of the second string of numerals. I think the "2" indicates that there are
two error messages in the array. I couldn't find anything about the
significance of the second number string.

My inclination is to suggest that you look for the gdscode errors via their
constant names. You can find them in the Language Reference, in the
section entitles "InterBase status array error codes". The constants are
fully declared in iberror.h which you will find in the /include directory
of your Firebird installation. If you are using Pascal, there are several
translations of these headers available.

Hint: if you are referring to the gds codes in an ON EXCEPTION GDSCODE...
structure in PSQL, you need to omit the "isc_" prefix from the constant
name. This isn't documented anywhere except in the Using Firebird manual
and it is there thanks to Ivan Prenosil's "inside knowledge".