I am working on a simple app, and I am trying to populate a table with data 
from a query submitted on another page.  One the first page the user selects an 
input from a list dynamically populated from the database.  After a submit, the 
next page loads and the user is asked to choose, using radio buttons, is asked 
to choose another input.  Both of these pages work fine.  the problem happens 
when the users chooses an input from the second page, and is redirected to the 
page with the table. 

When the page loads i get this error:  Complex object types cannot be converted 
to simple values.  I am more or less doing the same thing.  

Here is the query from the third page: 

<cfset ownerid="#Form.owners#">

<cfquery name="worksheetfill" 
        datasource="#Request.MainDSN#">
        SELECT *
        FROM OWNERS
        WHERE RENTERID = <cfqueryparam value="#ownerid#">
</cfquery>

When i do a cfdump on the query, it pulls the right record from the database, 
but once i try and output any of the fields i get the error.  

here is the first cfoutput tag: 
<cfoutput query="#worksheetfill#">#FIRSTNAME#</cfoutput>

Now I'm fairly new to coldfusion, but i did the same thing on the second page 
and it worked fine.  I have a feeling that using the radio buttons,  an array 
is getting passed.  And since i'm new to cf, I'm not really sure how to get at 
the data in an array.  

Here the query from the 2nd page: 
<cfset hoa="#form.Properties#">

<cfquery name="owners" 
        datasource="#Request.MainDSN#">
                SELECT *
                FROM HOAs INNER JOIN owners ON HOAs.hoaID = owners.project
                WHERE HOAS.NAME = <cfqueryparam value="#hoa#" >
</cfquery>

and here is the cfoutput loop: 

<cfform name="owner_data" method="post" action="rentalworksheet.cfm">The are 
the owners at <cfoutput>#hoa#</cfoutput> are:
                <cfoutput query="owners">
                <tr>
                        <td><input type="radio" name="owners" 
value='#OWNERS.RENTERID#' /></td>
                        <td>#OWNERS.FIRSTNAME# #OWNERS.LASTNAME#</td>
                        <td>#OWNERS.STREET# #OWNERS.CTY#, #OWNERS.STATE# 
#OWNERS.ZIP#</td>
                </tr>
        
                </cfoutput>

Any help with this would be greatly apprciated.  Thank in advance.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2102
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to