At 05:44 p.m. 29/09/2015, s hj senthile...@gmail.com [firebird-support] wrote:

>Occasionally (not always) I get the following error when I run some stored 
>procedures or views (database objects) that use the LTRIM function:
>
>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>can't format message 13:896 - message file C:Windows\firebird.msg not found; 
>invalid request BLR at offset 623; function LTRIM 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 LTRIM 
>function!!
>
>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 ? 

You have a messed-up installation.  It looks as though you have both a full 
server and an embedded setup.  In the embedded setup, you are missing the UDF 
libraries, which is where the server needs to find the entry point for the 
external function LTRIM, and firebird.msg, which contains the text of some 
external exceptions.

At the times when LTRIM works, I would say you are on the full server and the 
UDF libs are where they should be - in the UDF folder beneath the server's root 
directory.  If you want to use embedded instead of the full server, you'll need 
more than just the fbembed.dll sitting in the same directory as the 
application's exe file.  You'll need firebird.msg there too, and to create a 
copy of the ...\UDF folder directly beneath it.  You'll need to make sure 
everything belongs to Fb 2.5.  A message file from an older Fb version won't 
work properly with an Fb 2.5 client and/or server.

>And what will be the permanent solution ?

Well, first decide whether you're going to run the full server or embedded.  
You can keep the embedded installation if you want it for something;  but don't 
use a serverless protocol from the client for connecting to the database via 
the full server: use tcp/ip or wnet.  Then fbembed will behave like a remote 
client and won't try to attach to its embedded server.

>As I said earlier, this database is given by my client, and am not supposed to 
>modify anything (such as changing LTRIM to something else)

LTRIM is a bit of a pre-Fb 2.1 artifact, along with a multitude of other 
external scalar functions.  If it's the only external function being used, it 
might be worth considering altering the SP to use the internal function TRIM 
(with appropriate parameters) ( see 
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-trim.html
 ).  It's just an idea.


Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________ 

  • [firebird-support] in... s hj senthile...@gmail.com [firebird-support]
    • Re: [firebird-su... Helen Borrie hele...@iinet.net.au [firebird-support]

Reply via email to