Hi Toby, There is an extra #) in the insert query inside your cfloop tag. If you remove it, it should work fine.
Thanks, Hareni Adobe CF team -----Original Message----- From: Toby King [mailto:[EMAIL PROTECTED] Sent: 30 October 2007 18:48 To: CF-Talk Subject: fixing a piece of code Hi there I have a 2 programs one which displays dual select boxes on the screen. A user click on a persons name in the left-hand selection box and move the name to the right-hand box and vice versa. A button is at the bottom of the screen and when the user presses the button the names in the right hand sidebox will then be used to update a table in the database. The trouble is that the code isnt working and cant see why: I keep getting an error: Context validation error for the cfloop tag. The start tag must have a matching end tag. An explicit end tag can be provided by adding </cfloop>. If the body of the tag is empty, you can use the shortcut <cfloop .../>. Here is the code that I have: <cfquery name="qdeleterecs" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> DELETE FROM tbl_onshift </CFQUERY> <cfloop list="#girls#" index="q"> <cfquery name="qinsertrecs" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> INSERT INTO tbl_onshift (girlid, girlwname) VALUES ('#q#', #form.girlwname#)#) </cfquery> </cfloop> Any thoughts would be greatly appreciated - I have been stuck on this for a couple of hours. Regards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292317 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

