You need to var-scope your queries, or you'll run into concurrency issues if
you store this CFC in the application scope. This is critical. You must
var-scope everything: query names, loop index variables, temp variables,
etc.

On 9/20/07, Vince Collins <[EMAIL PROTECTED]> wrote:
>
>
> ========== INVENTORY.CFC ==============
> <cfcomponent hint="Inventory Object">
>   <cfset variables.dsn = "" />
>   <cfset variables.inventory = "" />
>   <cffunction name="init" access="public" returnType="inventory"
> output="false" hint="I instantiate qry">
>     <cfargument name="dsn" type="string" required="yes" />
>     <!--- initiate value(s) --->
>     <cfset variables.dsn = arguments.dsn />
>     <cfset variables.inventory = "none" />
>     <cfreturn this />
>   </cffunction>
>   <!--- getInventory  -  List inventory method --->
>   <cffunction name="getInventory" returntype="query" access="public"
> HINT="Returns all inventory as 'qryInventory', can pass optionally
> selSortBy to sort query">
>     <cfargument name="selSortBy" required="false" type="string"
> default="Class, Class_Name" />
>     <cfargument name="selInventoryID" required="false" type="numeric"
> default="0" />
>     <cfargument name="selClass_Name" required="false" type="string"
> default="" />
>     <cfargument name="selSubClass_Name" required="false" type="string"
> default="" />
>     <cfargument name="selSize" required="false" type="string" default=""
> />
>     <cfquery name="qryInventory" datasource="#variables.dsn#">
>       SELECT
>
>     </cfquery>
>     <cfreturn qryInventory />
>   </cffunction>
> </cfcomponent>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289032
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to