Copy link to clipboard
Copied
We have a CFC page that was working fine before moving to CF9 from CF8. Any ideas on why it is no longer working? It is not processing at all now - just giving us this error.
<cfcomponent displayname="Checks For Email Address" output="true" hint="Checks for an Existing Email">
<cffunction access="remote" name="CheckInData" returntype="boolean" description="Checks Email and Returns True if Email Address Exists" hint="Checks Email and Returns True if Email Address Exists">
<cfargument name="Email_Check" type="string" required="true"/>
<cfquery name="data" datasource="datasource" dbtype="OLEDB">
SELECT
FROM
EmailTable
WHERE
Email=<cfqueryparam value="#Trim(arguments.Email_Check)#" cfsqltype="cf_sql_varchar" />
AND
Company_ID='#company_ID#'
</cfquery>
<cfif data.RecordCount EQ 0>
<cfreturn false>
<cfelse>
<cfreturn true>
</cfif>
</cffunction>
Copy link to clipboard
Copied
@cover,
I see two things you might change, but I don't know if they will solve the problem. First, you don't need the "dbtype" attribute anymore with CFQuery, unless it's dbtype="query". Second, it's possible you have a race condition on your query results variable ("data"). You might add a line right below the CFArgument tag:
<cfset var data = "">
This will make the "data" variable local to the function.
Other than that, I can't see anything obvious. I'm not at all versed in WDDX, so maybe someone else will have some better ideas.
-Carl V.
Copy link to clipboard
Copied
Tried that. Did not work. Yep, it is not even running the CFC after the upgrade. Anyone else with ideas on how to fix and get working again?
Copy link to clipboard
Copied
Is that cfc attempting to do anything with WDDX?