House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFC Issue

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bruce Sorge
12/11/2006 04:50 PM

Hello, I have a CFC that works fine until I use a certain CFINVOKE. The invoke tag is thus: <cfinvoke component="CFC.getCouncils" method="listSelectedCouncil" returnvariable="listSelectedCouncilRet"> </cfinvoke> Now this one is no different than the other invokes I have on the page, and when I remove this one all is well. Below is the code from the actual CFC: <cffunction name="listSelectedCouncil" access="package" returntype="query" hint="Get the NC we want to edit"> <cfargument name="NCID" type="string" required="yes" hint="NC_ID is required" default="#ID#">   <cfquery datasource="#Application.dsource#" name="qNCSelected">    SELECT *    FROM tblNeighborhoodCouncil    WHERE NC_ID = #ID#   </cfquery>   <cfreturn qNCSelected> </cffunction> I can run the query just fine. I am befuddled. Thanks, Bruce

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dan Vega
12/11/2006 04:54 PM

You need to make sure you var scope your query names <cfset var qNCSelected = ""> I am not quite sure what your problem is though? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bruce Sorge
12/11/2006 05:00 PM

Sorry, I guess I should have put that out there too. I am getting this error: The package method 'listSelectedCouncil' in component C:\Intetpub\wwwroot\DONE\CFC\getCouncils.cfc cannot be access from C:\Intetpub\wwwroot\DONE\nc\Done_Edit.cfm ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Josh Nathanson
12/11/2006 05:10 PM

How about changing the access for listSelectedCouncil function from "package" to "public", maybe that would help? -- Josh ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Phill B
12/11/2006 05:03 PM

you require a variable named NCID to be passed into the component but you dont have an invokeargument for the variable we you invoke it. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
12/11/2006 05:05 PM

Sorry, I guess I should have put that out there too. I am getting this error: The package method 'listSelectedCouncil' in component C:\Intetpub\wwwroot\DONE\CFC\getCouncils.cfc cannot be access from C:\Intetpub\wwwroot\DONE\nc\Done_Edit.cfm And that is the reason for the error.  You have defined that function as a "Package" function.  That means it can only be run by code that is in the same "Package" i.e. directory is the CFC.  If your invoke is in a template in another directory it does not have permission to use this function as you have defined it. -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA --------- | 1 |   | ---------  Binary Soduko |   |   | --------- "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice:  This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bruce Sorge
12/11/2006 05:13 PM

I need to be more careful when using the intellisense on Dreamweaver. I keep forgetting that Package is before Public and I need to put the keys pu to get it. Thanks. ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference