Hello all,
I'm using CF MX7 and DW CS3, on WinXP with Oracle 10g.
I have a SQL query in a CFC that works beautifully in SQL*Plus but not
in CF. I use F12 to run the page in the server that comes with CF.
Here's the function in the CFC:
<cffunction name="getExample_status" output="false" access="public"
returntype="query">
<cfargument name="status" hint="Argument for status.">
<cfset var example_status = "" >
<cfquery name="example_status" datasource="#application.dsn#" username="
test" password="test">
UPDATE test_view
SET status =
UPPER(TRIM(<cfqueryparam value="#arguments.status#"
cfsqltype="cf_sql_varchar">))
WHERE test_id IN (
SELECT test_ID
FROM test_VIEW
WHERE UPPER(TRIM(STATUS)) =
UPPER(TRIM(
<cfqueryparam value="#arguments.status#"
cfsqltype="cf_sql_varchar">))
AND EXPIRE_DATE <= SYSDATE)
</cfquery>
<cfreturn example_status>
</cffunction>
Here's the code in the CFM:
<cfinvoke
component="Dev.components.example_queries"
method="getExample_status"
returnvariable="example_s">
<!--- CFC Query --->
<cfinvokeargument name="status" value="ACT">
</cfinvoke>
The recordcount comes back -1. I don't know how to get more detailed
debugging information than what you can set in the CF Administrator or
by using the Server Debug button on the Documents bar. I'd really like
to step into the code, but I can't find out how to do that or even if
it's possible.
This is the entry in the log file:
"Error","web-13","06/22/07","13:22:34","HRKS","Event name: onRequest"
"Error","web-13","06/22/07","13:22:34","HRKS","Message: Event Handler
Exception."
"Error","web-13","06/22/07","13:22:34","HRKS","Root Cause Message:
Variable EXAMPLE_STATUS is undefined."
Since the log file names the query in the CFC, does that mean I've coded
something wrong there? I've re-written it three times and this is still
happening.
Any advice is much appreciated, and thanks in advance.
Teresa
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2863
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15