Why are you using application variables to store the title and basetable? Application variables are application wide, so if 1 users goes to a page
Application.BaseTable = "tbl1000" Then another user goes to a different page: Application.BaseTable = "tbl2000" The first application variable gets overwritten. Try using a request variables or a just a plain variable. _____________________________ steve oliver senior internet developer atnet solutions, inc. http://www.atnetsolutions.com -----Original Message----- From: Keane, John (WDS) [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 6:32 AM To: CF-Talk Subject: ColdFusion updating wrong table I have a website hosted by a third-party. The site allows users to fill out a number of different surveys. Each survey is in it's own subdirectory. For example, MainSurveyHome | -> Survey1000Home | -> Survey2000Home Each directory contains an application.cfm file. The following code snippet is in each of the application.cfm files contained in a SurveyHome directory. <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes" NAME="#Application.ApplicationName#"TYPE="Exclusive"> <CFSET APPLICATION.TITLE = "On-Line Survey Questionnaire"> <CFSET APPLICATION.BASETABLE = "tbl1000"> </CFLOCK> Whenever a users finishes the survey, a SQL table is updated using syntax similar to this. <CFLOCK TIMEOUT="20" TYPE="Readonly" THROWONTIMEOUT="Yes" name="lock2"> <cftransaction> <cftry> <cfquery datasource="xxx" username="xxx" password="xxx"> INSERT #Application.BaseTable#_AA (F1, F2, F3, F4, DateEntered, DateModified ) VALUES ('1000', 'FIELD2', 'FIELD3', 'FIELD4', #Now()#, #Now()# ) </cfquery> <cfcatch type="DATABASE"> <CFOUTPUT> <cfinclude template="error.cfm"> </CFOUTPUT> <cfabort> </cfcatch> </cftry> </cftransaction> </cflock> About .5% of the time, the actual table updated is for a different survey. The value of Application.BaseTable is from the Application.cfm in a different subdirectory. I'm very confused and cannot figure out what could be causing this. If was every record it would clearly be a programming error, but less than 10 of very 2,000 records. Has anybody seen anything like this before? Thanks for your assistance. John Keane ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists