Meaning of the First Long in a Cluster
Go Up to Parsing the Status Vector
The first long in any cluster is a numeric descriptor. By examining the numeric descriptor for any cluster, you can always determine the:
- Total number of longs in the cluster.
- Kind of information reported in the remainder of the cluster.
- Starting location of the next cluster in the status vector.
Value | Longs in cluster | Meaning |
---|---|---|
0 |
— |
End of error information in the status vector. |
1 |
2 |
Second long is an InterBase error code. |
2 |
2 |
Second long is the address of string used as a replaceable parameter in a generic InterBase error message. |
3 |
3 |
Second long is the length, in bytes, of a variable-length string provided by the operating system (most often this string is a file name); third long is the address of the string. |
4 |
2 |
Second long is a number used as a replaceable parameter in a generic InterBase error message. |
5 |
2 |
Second long is the address of an error message string requiring no further processing before display. |
6 |
2 |
Second long is a VAX/VMS error code. |
7 |
2 |
Second long is a UNIX error code. |
8 |
2 |
Second long is an Apollo Domain error code. |
9 |
2 |
Second long is an MS-DOS or OS/2 error code. |
10 |
2 |
Second long is an HP MPE/XL error code. |
11 |
2 |
Second long is an HP MPE/XL IPC error code. |
12 |
2 |
Second long is a NeXT/Mach error code. |
Note: As InterBase is adapted to run on other hardware and software platforms, additional numeric descriptors for specific platform and operating system error codes will be added to the end of this list. |
By including ibase.h
at the start of your source code, you can use a series of #define
s to substitute for hard-coded numeric descriptors in the status vector parsing routines you write. The advantages of using these #define
s over hard-coding the descriptors are:
- Your code will be easier to read.
- Code maintenance will be easier should the numbering scheme for numeric descriptors change in a future release of InterBase.
The following table lists the #define
equivalents of each numeric descriptor:
Value |
|
Value |
|
---|---|---|---|
0 |
|
8 |
|
1 |
|
9 |
|
2 |
|
10 |
|
3 |
|
11 |
|
4 |
|
15 |
|
5 |
|
16 |
|
6 |
|
17 |
|
7 |
|
For an example of code that uses these defines, see Status Vector Parsing Example.