I work in Firebird 2.5 database:
Occasionally (not always) I get the following error when I run some stored procedures or views (database objects) that use the LRTRIM function:
Invalid token. invalid request BLR at offset 623 function LRTRIM is not defined module name or entrypoint could not be found Error while parsing procedure XXXXXXX (stored_procedure name) ;
(I get this both in IB Expert and SSRS)
This said I am able to access other database objects that do not use LRTRIM function!
I had a similar issue with LTRIM, now I am getting LRTRIM. I had copied firebird.msg from Firebird folder to Windows folder a few days back, and this is the new error message I get.
My temporary workaround:
Sometimes I restart the machine, and am able to run these same stored procedures and views that threw this error sometime back. At other times, I restart the machine a couple of times, and am able to access these views and stored procedures.
At some other times, I restart the machine many times, still not able to run the database objects. I get frustrated and quit for the day. When I open the machine fresh the next morning, I am able to run these objects again.
What could be the reason for this? And what will be the permanent solution?
**Now I have 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)**
In your current setup you seem to have two Firebird servers
Your UDF declaration points to module
UDF
, which is not a standard UDF, so this is most likely provided by your client to use with their database. You only have the libraries for these UDF in the 32 bit server installation, this means that you can only use the 32 bit server. Under some unknown conditions, you switch between the 32 bit and 64 bit server, meaning that subsequent connections are made to the 64 bit server, which doesn't have the required UDF which then leads to the error. You should uninstall the 64 bit server so this can't happen.You comment that you need both because of SRSS, but that isn't the case. You only need one Firebird server (32 bit or 64 bit; in this case 32 bit because of the UDF), and the client libraries (32 bit and 64 bit) for your applications.
So what you need to do:
And finally double check the connection strings or connection properties to ensure that you are always connecting to the same server (host & port), and that you aren't accidentally using an embedded connection.