"arithmatic exception, numeric overflow or string truncation" with UDFs in version 5.5

By: Borland Staff

Abstract: The way of handling terminator is changed from version 5.1 to version 5.5.

Problem:
Upgrading from version 5.1 to version 5.5, UDFs return error 
"arithmatic exception, numeric overflow or string truncation".  How 
come?

Solution:
The way of handling terminator is changed from version 5.1 to version 
5.5.  In version 5.5, there is an extra null character added.  If the 
maximum parameter is used in the UDF,then the truncation will be 
returned.  For example,  there is an UDF that returns char(5) as the 
output parameter.  When the UDF returns 5 characters, then this error 
will be generated.  The workaround is to re-declare the UDF to 
accommodate the extra null character.  For this case, the UDF needs to 
change to return char(6) for 5 character max.

Server Response from: ETNASC03