You can't loop over the results of an insert query, because an insert 
query produces no results.

You can only use CFLOOP with select queries.

  - Rick

Chris Kavanagh wrote:
> Dear list,
> 
> I'm getting this error message:
> 
> --
>   Attribute validation error for tag cfloop.
>   The value of the attribute query, which is currently "insert_people", 
> is invalid.
> --
> 
> I guess there's something wrong with my INSERT statement but I can't 
> figure out what it is.  I've tried permutations for the VALUEs with "s, 
> 's, no quotes, double #s, but it still doesn't seem to work.
> 
> Here's my code:
> 
> --
> <title>Taskomatic</title>
> <CFQUERY DATASOURCE="taskomatic">
>       DELETE FROM people_project
>       WHERE project_id = '#project_id#'
> </CFQUERY>
> 
> <CFQUERY NAME="insert_people" DATASOURCE="taskomatic">
>       INSERT INTO people_project
>       VALUES ('#person_id#', '#project_id#')
> </CFQUERY>
> </head>
> 
> <body>
> <h1>Access list updated </h1>
> <CFLOOP QUERY="insert_people">
>       <CFOUTPUT>#person_id#<br></CFOUTPUT>
> </CFLOOP>
> </body>
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192372
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to