Subject Re: [IBO] fn_blobs_equal causes AV in IB_EXPERT and -901 in ISQL
Author Frederic Bell
Hi Helen. Thanks for the prompt reply.

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?

Thanks
Freddie

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 11:36 PM 8/02/2007, you wrote:
> >I have just started out checking out the replication components and I
> >have followed the instructions for creating the fn_blobs_equal UDF. As
> >I had undesirable results, I created another UDF function by follwing
> >the instructions at
> >
> >http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_howto2#Windows
> >
> >That UDF worked!
> >
> >fn_blobs_equal however, causes the database to disconnect in ISQL, and
> >causes a database disconnnect and subsequent AV in IB_expert. I do not
> >have the source code for fn_blobs_equal, and even if I did I'm not
> >sure I could figure out that problem!
> >
> >Using firebird 1.5.
>
> UDFs involving blobs are not simple!
>
> Did you put the two dlls BlobCompare.dll and udflib.dll into your
> ..\udf directory?
>
> Did your declaration look like this?
>
> declare external function fn_blobs_equal
> blob,blob
> returns integer by value
> entry_point 'fn_blobs_equal'
> module_name 'udflib'
>
> Do you look for 1 or 0 as the returned value?
>
> e.g.
> case
> when fn_blobs_equal (blobA, blobB) = 1 then ...
> else
> .... end
>
> Helen
>