Subject | Re: embedded firebird and UDFs |
---|---|
Author | robert_hollay |
Post date | 2003-06-19T09:34:59Z |
Hi,
I'm afraid, this is a good old issue with FB (IB) and UDFs.
Dec. 2001, when I got the following answer from
Claudio Valderrama (the author of the FBUDF):
---- quotation
--- In firebird-support@yahoogroups.com, "Gustavo D. B."
<gustavo_000@o...> wrote:
I'm afraid, this is a good old issue with FB (IB) and UDFs.
Dec. 2001, when I got the following answer from
Claudio Valderrama (the author of the FBUDF):
---- quotation
>> Hi,---- end of quotation
>>
>> I have troubles with FBUDF.dll. This problem is several times
>> discussed in this newsgroup already, but nobody gave an adequate
>> answer yet...
>There's nothing special in FBUDF as a DLL. The only requirement is
>that the
>engine should be Firebird, not IB. IB doesn't understand the SQL
>script that
>declares the functions. Even if you tweak system tables, the most
>probably
>income is that IB will crash because it doesn't know to handle the
>return
>argument by descriptor and it doesn't know how to handle the return
>argument
>being timestamp. But I see you are using FB already.
>
>Try this URL:
>www.cvalde.com/utilities/fbudf.zip
>
>I found that in every release of IB (so FB may be affected as well)
>some
>random UDF declaration didn't work at all. My only solution was to
>drop the
>declaration, shut down IB, start it, declare the UDF and restart IB
>again.
>It happened to me with FreeUDFLib's original functions in IB4.2. It
>happened
>to me in IB6 beta, with the new function that I injected in
>FreeUDFLib,
>available with some fixes from
>www.cvalde.com/utilities/freeUDFLib.zip
>I couldn't convince the engine that the function was there! I even
>queried
>the operating system but there was no previous version loaded, etc.
>Since I
>shut down the machine at the end of my daily (or nightly) work,
>next day I
>found that the function worked.
>
>I think that there's some strange bug in the code that handles UDF
>homonyms
>inside the engine, when the UDF to be called should be decided
>based on an
>algorithm that might resemble how C++ picks the best overloaded
>function.
>Maybe it finds the only available homonym and decides that it's not
>the
>correct one, just a guess. But I looked at the code in the past and
>found
>nothing suspicious. (Yes, the core engine is prepared for some kind
>of UDF
>overloading, but it can't happen currently due to restrictions in
>system
>tables, so you can't have two UDFs with the same name.)
>
>Therefore, I don't have a suggestion other than try the zip from
>the above
>link and if it doesn't work, get a new computer, a new house and a
>new
>dog... my cat insists that dogs are the source of several problems.
>:-)
>
>C.
>--
>Claudio Valderrama C. - http://www.cvalde.com -
>http://www.firebirdSql.org
>Independent developer
>Owner of the Interbaser WebRing
>
--- In firebird-support@yahoogroups.com, "Gustavo D. B."
<gustavo_000@o...> wrote:
> Hi...had the same
>
> I've detected and I've told the forum in a previous post that I
> kind of error when trying to make UDFs work in FB under W98...problem is
>
> I've used that time the RC2 and now I'm using the RC3 and the
> still there... The problem is the same that you are describing...I've tryed
> a SuperServer Installation...(even the same
>
> I had the exact same instalation structure and configurations
> scripts to generate dummy DBs, etc, etc) under W2K and underW98... W2K
> worked fine, W98 didn't... So, because I thought I was doingsomething
> wrong, I un-installed FB and installed IB 6.01 in both machineswith the
> same structure/configuration... In this new case, all workedfine...
>expert... ;)
> I think that's something with FB, but of course, I'm not an
>
> Thanks...
>
> Gustavo.