No custom tag is being used, just a straight forward insert statement.......aggggghhh
-----Original Message----- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: 04 July 2002 15:52 To: CF-Talk Subject: Re: Inserting two records The only other thing I would check is if this might be running in a custom tag and does the tag have an end-tag ( even if it wasn't intended to have an end-tag ) ... based on the code I'm guessing it's not in a custom tag 'cause I don't see any references to the attributes scope though that's not an absolute qualifier... but if you have it in a custom tag and have somehow inadvertently applied an end tag, i.e. something like this: <cfmodule template="..."> <cfmodule template="..."> </cfmodule> or similar could cause an inadvertent ending of a custom tag in which case you could possibly get the code running twice... Isaac www.turnkey.to 954-776-0046 > Hi All > I am using CF5 and msaccess97 the server sits on a Windows > 2000 platform. > When using the following code the database inserts two > identical records > (all but the uniquieid) I have used debug and the insert > stament in not > looping - it's driving me insane. I have heard this may be > a bug? Dose > anyone else know? > Regards > Jason > <!-----// set todays date-------> > <cfparam name="ldate" > default="#DateFormat(now(),"dd-mmm-yyyy")#"> > <!---//lock the code to retreive the last entered > id-------> > <cflock name="insertinto" type="exclusive" timeout="30"> > <!----//check to see how many lists are already saved for > this user, and > redirect them if > they have more than six//----> > <cfquery name="getlist" datasource="#application.dsn#"> > SELECT * > FROM > save_list > where luserid = #session.id# > </cfquery> > <cfif getlist.recordcount LT 6> > <!-----//if the user has less than six saved lists, save > the new > list//--------> > <cfquery name="insert" datasource="#application.dsn#"> > INSERT INTO save_list (ldate, lname, list, luserid) > VALUES ('#ldate#', '#lname#', '#selected#', #session.id#) > </cfquery> > <!-----//get that last saved list id for the > re-direct//------> > <cfquery name="getmax" datasource="#application.dsn#"> > SELECT max(listid) as id > FROM save_list > </cfquery> > <!------//now the list is saved delete the temporary > search list//----> > <cfquery name="delete" datasource="#application.dsn#"> > DELETE FROM searchlist > where userlink = #session.id# > </cfquery> > <!----now re-direct the user to saved list//------> > <cfoutput> > <script language="JavaScript"> > setTimeout(window.location > ='saved_results.cfm?id=#getmax.id#', 5000); > </script> > </cfoutput> > <!------//if the user already has six saved lists, > re-direct them and ask > them to overwrite one of the existing----> > <cfelse> > <cflocation > url="over_ten.cfm?selected=#selected#&urlname=#form.lname# > &ldate=#ldate#"> > </cfif> > </cflock> > This e-mail and any files transmitted with it are > confidential and > intended solely for the use of the individual or entity to > whom they > are addressed. If you have received this email in error > please notify > [EMAIL PROTECTED] > Whilst every endeavour is taken to ensure that e-mails are > free from > viruses, no liability can be accepted and the recipient is > requested > to use their own virus checking software. > __________________________________________________________ > ____________ > Your ad could be here. Monies from ads go to support these > lists and provide more resources for the community. > http://www.fusionauthority.com/ads.cfm > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Archives: > http://www.mail-archive.com/[email protected]/ > Unsubscribe: > http://www.houseoffusion.com/index.cfm?sidebar=lists ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

