|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
CFC Issue
Hello,Bruce Sorge 12/11/06 04:50 P You need to make sure you var scope your query namesDan Vega 12/11/06 04:54 P Sorry, I guess I should have put that out there too. I am getting thisBruce Sorge 12/11/06 05:00 P How about changing the access for listSelectedCouncil function fromJosh Nathanson 12/11/06 05:10 P you require a variable named NCID to be passed into the component butPhill B 12/11/06 05:03 P Sorry, I guess I should have put that out there too. I am getting thisIan Skinner 12/11/06 05:05 P I need to be more careful when using the intellisense on Dreamweaver. I keepBruce Sorge 12/11/06 05:13 P 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 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 ----- 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 ----- 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 ----- 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 ----- 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. 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 -----
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||