Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ib 6.0.1 and UDF ascii_char error [DOC3] #17

Closed
firebird-automations opened this issue Nov 29, 2000 · 0 comments
Closed

Ib 6.0.1 and UDF ascii_char error [DOC3] #17

firebird-automations opened this issue Nov 29, 2000 · 0 comments

Comments

@firebird-automations
Copy link

Submitted by: markit (markit)

SFID: 223789#⁠
Submitted By: markit

If you declare the function ascii_char like stated in the documentation or in the example provided in InterBase\examples\Udf\ib_udf.sql, i.e.:
DECLARE EXTERNAL FUNCTION ascii_char
INTEGER
RETURNS CHAR(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';

if you use it, i.e.:
select ascii_char(65) from rdb$database
you will receive the error:
"-arithmetic exception, numeric overflow, or string truncation -"
That's because the declaration ha to be different:
DECLARE EXTERNAL FUNCTION ascii_char
INTEGER
RETURNS CSTRING(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant