Q. I've tried to use the UDF ascii_char, but I receive the error:
arithmetic exception, numeric overflow, or string truncation
I have defined the function the same as in IB_UDF.SQL:
DECLARE EXTERNAL FUNCTION ascii_char
INTEGER
RETURNS CHAR(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';
A. You get this error because that function is wrongly defined in both the manual and the script. The right definition is:
DECLARE EXTERNAL FUNCTION ascii_char
INTEGER
RETURNS CSTRING(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';
Last Modified: 21-FEB-02