String Addresses

From InterBase

Go Up to Meaning of the Second Long in a Cluster

String addresses point to error message text. When the first long in the cluster is 2 ­(isc_arg_string), the address pointed to often contains the name of the database, table, or column affected by the error. In these cases, InterBase functions which build error message strings replace a parameter in a generic InterBase error message with the string pointed to by this address. Other times the address points to an error message hard-coded in a database trigger.

When the first long in the cluster is 5 (isc_arg_interpreted), the address points to a text message which requires no further processing before retrieval. Sometimes this message may be hard-coded in InterBase itself, and other times it may be a system-level error message.

In either of these cases, InterBase functions such as isc_print_status() and isc_interprete() can format and display the resulting error message for you.

String Length Indicators

When the first long in a cluster is 3 (isc_arg_cstring), the numeric value in the second long indicates the length, in bytes, of a message string whose address is stored in the third long in the cluster. This string requires translation into a standard, null-terminated C string before display.

Numeric Values

A numeric value has different meanings depending upon the value of the numeric descriptor in the first long of a cluster. If the first long is 4 (isc_arg_number), a numeric value is used by InterBase functions to replace numeric parameters in generic InterBase error messages during message building. For instance, when an integrity error occurs, InterBase stores the code of the trigger which detects the problem as a numeric value in the status vector. When an InterBase function like isc_interprete() builds the error message string for this error, it inserts the numeric value from the status vector into the generic InterBase integrity error message string to make it more specific.

Operating System Error Codes

If the first long in a cluster is greater than 5, the numeric value in the second long is an error code specific to a particular platform or operating system. InterBase functions should not be used to retrieve and display the specific platform or operating system error message. Consult your operating system manual for information on how to handle such errors.

Advance To: