Subject | Re: [firebird-support] invalid request BLR at offset 63 - functions (LTRIM,RTRIM,LRTRIM) not defined - module name/entrypoint not found |
---|---|
Author | s hj |
Post date | 2015-10-13T11:11:40Z |
On Tue, Oct 13, 2015 at 12:29 PM, 'Thomas Steinmaurer' ts@... [firebird-support] <firebird-support@yahoogroups.com> wrote:> Hello Team,
>
> A few days back, I posted a message regarding 'Firebird BLR 623 invalid
> request - LRTRIM is not defined -
> module name or entrypoint could not be found' when I ran some stored
> procedures that used either LTRIM
> or LRTRIM functions (occasionally,though not always).
>
>
> Getting to the bottom of this problem, I found this:
>
>
> In my Firebird database, these are the UDF definitions:
> --------------
> DECLARE EXTERNAL FUNCTION LTRIM
> CSTRING(1000)
> RETURNS CSTRING(1000)
> *ENTRY_POINT 'lTrim' MODULE_NAME 'UDF';*
> ----------------
> DECLARE EXTERNAL FUNCTION LRTRIM
> CSTRING(1000)
> RETURNS CSTRING(1000)
> *ENTRY_POINT 'lrTrim' MODULE_NAME 'UDF';*
> ----------------
> DECLARE EXTERNAL FUNCTION RTRIM
> CSTRING(10000)
> RETURNS CSTRING(10000)
> *ENTRY_POINT 'rTrim' MODULE_NAME 'UDF';*
> ----------------
>
> I have a 64-bit cum 32-bit Firebird, both needed to work in different
> segments of Microsoft SSRS.
>
> When I run these statements in IB Expert:
>
> select ltrim (' Waste no space ')
> from rdb$database
>
> select rtrim (' Waste no space ')
> from rdb$database
>
> select lrtrim (' Waste no space ')
> from rdb$database
>
>
> Ocassionally (not always) I get the following error:
>
> Invalid token.
> invalid request BLR at offset 63.
> function LRTRIM is not defined.
> module name or entrypoint could not be found.
>
> --------------------------
>
>
>
> After some researching, I found this:
>
> In the 32-bit folder: C:\Program Files (x86)\Firebird\Firebird_2_5\udf , I
> find these 8 files:
> fbudf.dll,fbudf.sql,fbudf.txt,ib_udf.dll,ib_udf.sql,ib_udf2.sql,udf.dll,UDFPricing.dll
> ;
>
> But in the 64-bit folder: C:\Program Files\Firebird\Firebird_2_5\UDF , I
> find these 6 files:
> fbudf.dll,fbudf.sql,fbudf.txt,ib_udf.dll,ib_udf.sql,ib_udf2.sql
>
> (I do NOT find the last 2 .dll files - *udf.dll and UDFPricing.dll* - that
> are present in
> the 32-bit folder)
Both DLLs do not ship with the default Firebird distribution, thus must be custom UDF libraries.
> Will it be okay if I copy the udf.dll from the 32-bit folder and drop it in
> the 64-bit folder ?
No. UDF DLLs for Firebird 64-bit must be compiled as 64-bit DLLs.
> Will this be a solution? Or can I change the definition of the UDF itself -
> such as changing the
> module name to something instead of 'UDF'.
Either you put a 64-bit edition of the UDF libraries into the UDF directory of your Firebird 64-bit installation, or you have to move to a different 64-bit UDF library where the targeted function names are equally named (if you do not want to change your existing SQLs) there or check out the release notes of Firebird 2.1/2.5, because quite some functions have been added into the engine without the need to use a UDF library.
--
With regards,
Thomas Steinmaurer
http://www.upscene.com
Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.