I was trying to call an Oracle function from ColdFusion today and was just receiving error, after error, after error… well you get the point. Long story short, I couldn’t successfully get a response since there is no binding between ColdFusion and the Oracle BOOLEAN type, and the function was returning BOOLEAN. So I changes the response to 0/1 and it works.
Just something to keep in mind.
<cfquery name="myQueryName" datasource="myDS">
select myPackage.myFunction(myArg1, myArg2) response from dual
</cfquery>
<cfdump var="#myQueryName.response#">
3 Responses for "Calling Oracle functions in ColdFusion – BOOLEAN restriction"
As far as I know, Oracle doesn’t even have a Boolean data type (at least not in version 9).
I’m running on 10g here and you can return a BOOLEAN data type.
Returning a Boolean value from a function and using a Boolean value(perhaps returned from a function) in a SQL statement are two totally different things.
SQL(as a standard) has no concept of Boolean(outside of case statements), so don’t try to use them in queries.
# Steve Brownlee on May 7th, 2008 5:17 pm
“I’m running on 10g here and you can return a BOOLEAN data type.”
Right, PL/SQL(which is a superset of SQL) does have the data type Boolean. SQL does not.
# Brian Swartzfager on May 7th, 2008 4:52 pm
“As far as I know, Oracle doesn’t even have a Boolean data type (at least not in version 9).”
Also correct; Oracle’s implementation of SQL does not have the data type Boolean.
Leave a reply