Subject | Re: [IBO] fn_blobs_equal causes AV in IB_EXPERT and -901 in ISQL |
---|---|
Author | Helen Borrie |
Post date | 2007-02-09T06:38:42Z |
At 05:14 PM 9/02/2007, you wrote:
Firebird/IB haven't changed the way they handle UDFs. It should be
in your IBO Community download list if you are a registered user, as
it is part of the IB_Replication module (if purchased separately) or
is included in the Productivity Bundle and the Total Bundle.
But you should have *both* dlls. The should be in your Download
section as BlobCompare.zip. As I recall, for POSIX servers, Ann put
the entire code in a single shared object, BlobCompare.so, but, for
Windows, BlobCompare.dll is the "engine" for the function and
doesn't export fn_blobs_equal itself. The udflib.dll contains the
interface for the function call and the code that call the function
in the "engine" library.
With a UDF, you have to be sure that you don't pass a null to either
of the input arguments. (Some of the shipped UDFs with Firebird 2
have been rewritten to allow null in a return parameter but certainly
this UDF returns only 1 or 0.)
Helen
>Hi Helen. Thanks for the prompt reply.There is no "latest version". The library is written in C and
>
>I can assure you that I followed the instructions precisely.
>
>The function is registered in the database without compilation errors,
>and when I start typing the select statement below, IB_expert gives me
>code completion hints.
>
>The error occurs when I do a:
>
>select fn_blobs_equal(
>select invoicemessage from inv1 where invkey = 74742,
>select invoicemessage from inv1 where invkey = 74743) from rdb$database
>
>I have not tried to use the function in a stored procedure yet.
>
>Invoicemessage is a blob type 1 column.
>
>One possibe cause of the problem is that I have been supplied (by my
>employers) with an out-of-date dll as it came packaged in rpl_help.zip
>and is called BlobCompare.dll - NOT udflib.dll as in your response to
>my previous message.
>
>How can I obtain the lastest version?
Firebird/IB haven't changed the way they handle UDFs. It should be
in your IBO Community download list if you are a registered user, as
it is part of the IB_Replication module (if purchased separately) or
is included in the Productivity Bundle and the Total Bundle.
But you should have *both* dlls. The should be in your Download
section as BlobCompare.zip. As I recall, for POSIX servers, Ann put
the entire code in a single shared object, BlobCompare.so, but, for
Windows, BlobCompare.dll is the "engine" for the function and
doesn't export fn_blobs_equal itself. The udflib.dll contains the
interface for the function call and the code that call the function
in the "engine" library.
With a UDF, you have to be sure that you don't pass a null to either
of the input arguments. (Some of the shipped UDFs with Firebird 2
have been rewritten to allow null in a return parameter but certainly
this UDF returns only 1 or 0.)
Helen