Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

specified CFC could not be found

Participant ,
Nov 12, 2012 Nov 12, 2012

Googled this for several hours, hope I'm missing the obvious as usual...

I'm using CF9 and IIS7. Followed/tailored simple autosuggest code from Ben Forta.

Came up with HTML:

<cfinput type="text" name="Employer" size="50" autosuggest="cfc:employer.lookupEmployer({cfautosuggestvalue})">

and a CFC named employer.cfc in the current template folder:

<cfcomponent output="false">

     <cffunction name="lookupEmployer" access="remote" returntype="array">

          <cfargument name="search" type="any" required="false" default="">

          <cfset var data="">

          <cfset var result=ArrayNew(1)>

          <cfquery name="data" datasource="Binkley">

               Select lname

               From tdLicense

               Order By lname

          </cfquery>

          <cfloop query="data">

               <cfset ArrayAppend(result, lname)>

          </cfloop>

          <cfreturn result>

     </cffunction>

</cfcomponent>

The query runs fine in a test cfm file.

Any help appreciated.

16.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 15, 2012 Nov 15, 2012

Dan Bracuk wrote:

If your search is case sensitive, that would explain why you are not getting results.

I'm getting a response. I typed UCase in the form and got same response.: ["SMALL, EDWARD H ","SMALL, GEORGIA A ","SMALL, JENNIFER LEIGH","SMALL, JOHN PRESTON ","SMALL, JOHN WILLIAM "]

It just never shows up on the page

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2012 Nov 15, 2012

Strange. There is apparently a translation from C:\inetpub\wwwroot\ to C:\Workgroups\WebPages\. If that is indeed so, then this should work:

<cfinput type="text" name="Employerx" id="Employerx" size="50" autosuggest="cfc:/binkley/TrackData/NoMenu/employers.lookupEmployer({cfautosuggestvalue})">

or, using the dotted notation,

<cfinput type="text" name="Employerx" id="Employerx" size="50" autosuggest="cfc:/binkley.TrackData.NoMenu.employers.lookupEmployer({cfautosuggestvalue})">

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources