Jeff,

Referencing a query and column name (<cfset result=data.tirerear>) will only 
return the first record, no matter how many records are in the query's results. 
 You might try something like:

<cfset result=ValueList(data.tirerear)>

OR

<cfset result=QuotedValueList(data.tirerear)>

HTH,
Carl

> 
> I'm binding <cfdiv> to a cfc that runs a simple query that may give 
> more than one result. 
> 
> Works great, except <cfdiv> only displays the first result. 
> 
> For my cfc I have:
> 
 
> <cffunction   name= "gettires"   access= "remote"   returnType= "any" 
> >
 
> <cfargument   name= "model"   type= "string"   required= "true" >
 
> <cfargument   name= "make"   type= "string"   required= "true" >
 
> <cfargument   name= "year"   type= "string"   required= "true" >
 
> <!--- Define variables --->
 
> <cfset   var  data= "" >
 
> <cfset   var  result= "" >
 
> <!--- Get data --->
 
> <cfquery   name= "data"   datasource= "#THIS.dsn#" >
 
> SELECT tirerear
> FROM tires
> WHERE model =  '#ARGUMENTS.model#'  and make =  '#ARGUMENTS.make#'  
> and  year  =  '#ARGUMENTS.year#'
 
> </cfquery>
 
> <cfset  result=data.tirerear >
 
> <cfreturn  result >
 
> </cffunction>
> 
 
> For my cfm I have:
> <cfdiv bind="cfc:mycfc.gettires({model},{make},{year})" 
> bindonload="false" ID="theDiv" />
> Am I missing something??  If I try to change the CFC returntype to 
> "Query" the display page errors. 
 
> The value returned from the gettires function is not of type query."
> 
> -Jeff
> 
> 
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:292980
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to