OK - that made a difference
I'm now getting the following: Variable GIRLS is undefined. The error occurred in *C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\gkpro\act_checkin.cfm: line 55* 53 : </CFQUERY> 54 : *55 : <cfloop list="#girls#" index="q"> * 56 : <cfquery name="qinsertrecs" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> 57 : INSERT INTO tbl_onshift (girlid, girlwname) Any ideas? Thanks On 10/30/07, Hareni Venkatramanan <[EMAIL PROTECTED]> wrote: > > 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 > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:292326 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

