It's not a CFC issue actually... You're returning "invAll", but the name of
your variable ( query ) is "allInv" ... :)

Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

> I am playing around with some cfc's to get a better grasp of them on
> MX...

> Now, one of the methods works fine (category)...one does not (getAll)...
> Here is the cfc code (inventory.cfc)
> ---------------------
> <cfcomponent hint="Inventory functionality">

>       <!--- list all categories --->
>       <cffunction name="Category" hint="Get list of categories">

>               <cfquery name="getCat" datasource="coldfusionwebscom">
>               SELECT *
>               FROM Category
>               </cfquery>

>               <cfreturn getCat>
>       </cffunction>

>       <!--- get all in inventory table --->
>       <cffunction name="getAll" access="remote">

>               <Cfquery name="allInv" datasource="coldfusionwebscom">
>               SELECT *
>               FROM Inventory
>               </CFQUERY>


>               <cfreturn invAll>

>       </cffunction>
> </cfcomponent>

> --------------------------------------------------

> Here are the calls to the methods
> --------------------------------------------
> Get the cateogries (category):<br><br><br>

> <cfinvoke component="Inventory" method="Category" returnvariable="cat">
> <cfdump var= #cat#>


> get all inventory (getall):<br>
> <br><br>
> <cfinvoke component="Inventory" method="getAll"
> returnvariable="InvResult"> <cfdump var= #InvResult#>


> ---------------------------------------------

> The category method works fine, shows me all the categories... The
> getAll does not. It says Error Occurred While Processing Request
> Variable INVALL is undefined.


> You can see this here:

> http://coldfusionwebs.com/mxtest/inventory.cfm

> What is up with this? They are called the same exact way...the query
> allINV is returning 212 records..... Any ideas?

> ~~
> Stephenie

> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to