Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:07:57+00:00 2026-06-17T19:07:57+00:00

We make use of a binary value which is stored in tables as CHAR(18)

  • 0

We make use of a binary value which is stored in tables as CHAR(18) CHARACTER SET OCTETS.

In Firebird 2.0.4, we used a ASCII as both the default database character set and the connection character set. We have a UDF that can generate the required data which is defined as:

DECLARE EXTERNAL FUNCTION CREATEBINARY
RETURNS CSTRING(76) 
ENTRY_POINT 'CREATEBINARY'
MODULE_NAME 'CustomUDF';

Retrieving the value with

SELECT CREATEBINARY() FROM RDB$DATABASE

returns the expected value.

In Firebird 2.5.2, we are using UTF8 as both the default database character set and the connection character set. Trying to call our UDF with the above select statement now results in a an error:

Context: Statement::Fetch
Message: idx_dsql_fetch failed.

SQL Message: -104
Invalid Token

Engine Code: 335544849
Engine Message:
Malformed string

I have tried modifying the function declaration to specify the character set of the result as being OCTETS and NONE:

DECLARE EXTERNAL FUNCTION CREATEBINARY
RETURNS CSTRING(76) CHARACTER SET OCTETS
ENTRY_POINT 'CREATEBINARY'
MODULE_NAME 'CustomUDF';

but I still receive the same error result.

I have tested this in FlameRobin 0.9.3.1870, and in our application using Delphi XE2 Update 4 and IBObjects 4.9 Release 14. Both fail in the same way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:07:58+00:00Added an answer on June 17, 2026 at 7:07 pm

    The problem appears to be the incorrect size specified for the return result. Changing the declaration to

    DECLARE EXTERNAL FUNCTION CREATEBINARY
    RETURNS CSTRING(18) CHARACTER SET OCTETS
    ENTRY_POINT 'CREATEBINARY'
    MODULE_NAME 'CustomUDF';
    

    makes the function work correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application used to make use of a common base form that all forms
We are porting an app which formerly used Openbase 7 to now use MySQL
I use to make use of wildcards in a Makefile in order to select
We make use of views and panels quite often in Drupal and a lot
I make use of generic views and I am attempting to query my MySQL
My program needs to make use of void* in order to transport data or
I would like to make use of request scoped beans in my app. I
How to make use of jndi in a stand-alone (non-managed) application? App and Tomcat6
I want to make use of an API but it print alot of info
I need to make use of some OWL ontologies in c#. Does anyone have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.