Subject Re: UDF - entry point could not be found F_ADDMONTH
Author karolbieniaszewski
--- In, "homerjones1941" <homer@...> wrote:
> I've tried moving freeUDFlib.dll into various folders just to make sure it was in a visible path.
> I'm having trouble using a UDF in this Stored Procedure. I can see F_AddMonth in the UDF list, and the procedure compiles, but when I try to commit, I get this message:
> Invalid token.
> invalid request BLR at offset 188.
> function F_ADDMONTH is not defined.
> module name or entrypoint could not be found.
> I don't know if I should include some kind of declaration, or if I have a problem with the DLL. I'm using Firebird 2.1. I had this problem once with FB 2.0 and solved it by changing the character set to "none". That hasn't helped since switching to 2.1.
> My CODE:
> create procedure P_UTIL_RENEW_AUTO_RENEWAL
> as
> declare variable ipolperiod integer;
> declare variable bRenew varchar(1);
> declare variable dtrenewdate date;
> declare variable dttoday date;
> select AUTO_UPDATE_RENEWALS from POLICYDAT into :bRenew;
> select renewal from deta into :dtrenewdate;
> select current_date from RDB$DATABASE into dtToday;
> UPDATE deta
> SET deta.renewal = (F_AddMonth(:dtrenewdate, :ipolperiod ))
> where deta.renewal < :dtToday;


i do not follow suggestions by others how to solve problem with udf
but what functions do you need?
I ask because many functions are present now in Firebird 2.1.x itself.
look into C:\Program Files\Firebird\Firebird_2_1\doc\sql.extensions\README.builtin_functions.txt

Your sample try to add month.
use built in function insteed of F_AddMonth

Karol Bieniaszewski