If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > One of the UDF no longer works after upgrading to Firebird 2.0

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-26-06, 10:00
clawhammer clawhammer is offline
Registered User
 
Join Date: Jun 2006
Posts: 4
One of the UDF no longer works after upgrading to Firebird 2.0

We were using Firebird 1.5 and we had a UDF called f_strblob which came from the FreeUDFLib.dll. We were using this UDF in the following select SQL statement:

SELECT PI.ORG, PI.ID, OPI.COMMENTS, PI.DESCRIPTION, PI.MIN_DONATION, PI.ORDERABLE, OPI.POPUP
FROM PRODUCT_INFO PI LEFT OUTER JOIN ORG_PRD_INFO OPI ON OPI.ORG = PI.ORG AND OPI.PID = PI.ID JOIN ORGANIZATIONS O ON PI.ORG = O.ORGANIZATION_ABBREVIATION AND O.ACTIVE_YN = 'Y'
UNION SELECT OPI.ORG, OPI.PID ID, OPI.COMMENTS, CAST('Organization Comments' AS VARCHAR(60)), CAST(0.0 AS double precision), 'N', f_strblob('')
FROM ORG_PRD_INFO OPI JOIN ORGANIZATIONS O ON OPI.ORG = O.ORGANIZATION_ABBREVIATION AND O.ACTIVE_YN = 'Y' WHERE OPI.PID = 'NONE'
ORDER BY 1, 2

After upgrading to Firebird 2.0, now that statement gives this error:

fmSQLEditor.Query:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Datatypes are not comparable in expression UNION.


As soon as I take out the OPI.POPUP and f_strblob('') from the statement it runs, so the problem is with the fuction. I tried using a different library, but same error. Eventually I got it working by replacing f_strblob('') with null, but I would still like to know what was causing the problem in the first place
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On