Subject Re: [IBO] fn_blobs_equal causes AV in IB_EXPERT and -901 in ISQL
Author Helen Borrie
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