Subject Re: Moving UDF from 1.5 to 2.0 problems
Author melvinhcox
Have the cause and solution for this problem been confirmed?

I am running into the same problem with a database that ran flawlessly
under Firebird 1.5

"invalid request BLR at offset 5 function DIV is not defined module
name or entrypoint could not be found"

All help in resolving this issue is deeply appreciated!!


M.C.

--- In firebird-support@yahoogroups.com, Krzysztof Koz³owski
<kozlorf@...> wrote:
>
> Hi,
>
> I'm using the Firebird DB in my project, and started moving everything
> from 1.5 to 2.0, and found a problem. Everything worked fine under
> 1.5. However, now when I run the project, I get the following
> exception (I use the same DB file which I used under 1.5):
>
> "invalid request BLR at offset 48
> function DATEASNUMTEXT20 is not defined
> module name or entrypoint could not be found"
>
> DATEASNUMTEXT20 is an UDF function.
>
> I have tried to build up the DB from scratch using an existing script,
> which worked under 1.5. In the header it contains the declaration:
>
> DECLARE EXTERNAL FUNCTION DATEASNUMTEXT20
> TIMESTAMP
> RETURNS CSTRING(64) FREE_IT
> ENTRY_POINT 'DateAsNumText20' MODULE_NAME 'MyUDF';
>
> and it runs through it with no errors. However it gives me the same
> error in the middle of the script:
>
>
/*******************************************************************************
> The next statement causes the following error:
>
> Invalid token.
> invalid request BLR at offset 52.
> function DATEASNUMTEXT20 is not defined.
> module name or entrypoint could not be found.
>
*******************************************************************************/
> CREATE TRIGGER CLIENT_ACTIVE_BI FOR CLIENT_ACTIVE
> ACTIVE BEFORE INSERT POSITION 0
> AS
> BEGIN
> IF (NEW.ID IS NULL) THEN
> NEW.ID = GEN_ID(GEN_CLIENT_ACTIVE_ID,1);
> NEW.MARKER = dateasnumtext20(NEW.msgtime)||nowasnumtext20();
> END
> ;
>
> What can be the problem here?
>
> Regards,
>
> Krzysztof
>