On 1-10-2015 13:51, [email protected] [firebird-support] wrote: > > > I have been running Firebird 2.5 (32 bit) for sometime - in Windows 7 64 > bit. I use one of my own UDFs and FreeAdhocUDF for a lot of my queries. > > I am now trying to get Firebird 64 bit Super Server to work. The exact > version is Firebird-2.5.4.26856_0_x64. No problems there. My application > (in Delphi) is 32 bit and I am connecting using the 32 bit client. I > also use FBMaestro (32 bit) to connect and no problems. Any operation > that does not need th e UDFs is fine. > > The only problem I have is that I cannot get the 64 bit UDFs to work. If > I try to call a UDF I get the well known error > > |invalid request BLR at offset 59 function F_ADDDAY is not defined module > name or entrypoint could not be found| > > The UDFs are 64 bit (the file is WIN64_FreeAdhocUDF20101206), and they > are in the Firebird UDF folder. > C:\Program Files\Firebird\Firebird_2_5\UDF > > The FreeAdHoc one is called FreeAdhocUDF.dll. > > There is no other copy of this file anywhere on the computer (ie not in > the PATH somewhere). > > The definition for the UDF is in the database - ie > > DECLARE EXTERNAL FUNCTION F_ADDDAY > TIMESTAMP, > INTEGER > RETURNS TIMESTAMP FREE_IT > ENTRY_POINT 'addday' MODULE_NAME 'FreeAdhocUDF'; > > this works just fine in the 32 bit Firebird. > > In the Firebird.conf file I have the UDF line commented out ie > #UdfAccess = Restrict UDF > > But I have tried a number of combinations here. > UdfAccess = Restrict UDF ,etc > > nothing works. > > I have tried this in Windows 7 x64 and Windows 10 x64. I have my own > UDF.DLL compiled as 64 bit and I have the same problem with that file. I > only mention FreeAdhocUDF here as I guess a lot of people use it - and > if I can get that to work, then my DLL should also work. > > After every change, I restart the Firebird service. > > Any suggestions on what to do next would be much welcomed.
I rarely use UDFs, but if you are sure your Firebird is 64 bit, and the UDF is 64 bit as well, then I am at a loss to explain the behavior. You could consider moving away from UDFs. For example F_ADDDAY can be replaced with DATEADD, see http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-dateadd.html Also make sure you are really connecting to the server, some Firebird admin tools have Firebird embedded built-in, and if you don't explicitly specify a hostname (or localhost), they will use Firebird embedded, which could well be a 32 bit version. -- Mark Rotteveel
