Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Cffunction not working properly since CF 11 upgrade

$
0
0

Good morning everyone! I am in the process of testing out my code after upgrade from CF 9 to CF 11 update 7, so far things are going quite well except for one feature that was not built by me for our intranet page- The feature is a quick search button that allows users to type and get auto suggest options- For example typing Form would bring up anything in out links database that has the word form in it. This works perfectly on CF9, on CF11 it works ( no errors) except for the query only pulls based on the first letter typed  For Example previously I could type Interview and I would get multiple results with the word interview in it, now i type and i only get results that start with matching letters. Below is a screen show that may make more sense as well as part of our code- I have verfied in SQL mgm studio that the query outputs the correct information- I also ran code analyzer on this page and it came back with no issues

 

Also during the upgrade i exported the .car file from cf 9 into cf 11 so the settings should be the same- also like i said before it is not throwing errors- it works- just not with the fully correct results- my apologies if the code is not up to par- like i said i didn't write this!

Cf9-11.PNG

CODE OUTPUT of CFC File

 

<cfcomponent>

<cfset ds="IntranetLinks">

<!--- Function to get the web pages from the database. Used for the Auto-Suggest --->

<cffunction name="lookupLink"

  access="remote"

  returntype="String"

  hint="Lookup method for Ajax auto-suggest">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

 

 

<cfquery datasource="#ds#" name="data">

SELECT PageName

FROM dbo.links

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY PageName

</cfquery>

 

<cfreturn ValueList(data.PageName)>

 

</cffunction>

<!--- Function to get the URL from the database. Populates the hidden text box on the page and used in Javascript to go to the uRL --->

<cffunction name="GetURL"

  access="remote"

  returntype="String"

  hint="Gets URL of Page - used for binding">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

 

 

<cfquery datasource="#ds#" name="data">

SELECT URL, PageName

FROM dbo.links

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY URL

</cfquery>

 

<cfreturn data.URL>

</cffunction>

 

</cfcomponent>


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>