Um...yes of course. Please hold all derisive laughter till the end. *wry grin*
Check the top where I am grabbing the next sequence number. I am wondering whether this is all wrong..and I should not use this number that I get in the qryStoreMain when I am doing the insert, instead of using the next sequence... I should be determining #TheMainID# and using that in my qryStoreMain instead.Right now I am just using the tblmainentrysequence value...essentially the autonumber value straight from the table. I am thinking that this could throw everything off if say two or three other orders go through at the same time... then the sequence values will be off,although this is all wrapped in a CFTRANSACTION? About 400 people hit the system this morning for the first time. Before that we were only able to test about 10 -Gel ---------Long Code Snippet------- <CFTRANSACTION> <!---- Grab the next sequence number from the default DUAL table available in all oracle installations for insertion into the Detail table ---> <CFQUERY name="qryGetLastID" datasource="xxxxxxxx" dbtype="Oracle80"> SELECT tblmainentry_seq.nextval AS ID FROM dual </CFQUERY> <CFQUERY name="qryGPD" datasource="xxxxxxxx" dbtype="Oracle80"> Select SAP_IO_DESC FROM Project_Information WHERE SAP_IO_NBR = #form.ordernum# </CFQUERY> <cfquery name="qryStoreMain" datasource="xxxxxxxx" dbtype="Oracle80"> INSERT INTO tblMainEntry (MainID,ordernum,empname,empid,projdesc,startdate) VALUES (tblmainentry_seq.nextval,#form.ordernum#,'#form.empname#',#Client.EmplI D#,'#qryGPD.SAP_IO_DESC#',to_date('#form.startdate#','mm/dd/yyyy')) </cfquery> <CFSET TheMainID = #EVALUATE("qryGetLastID.ID + 1")#><!--- Set a variable to the next ID in the Main ID sequence of records for use in the DetailEntry table---> <!--- Insert the Equipment Table Data ---> <CFINCLUDE template="insertequipmentdata.cfm"> <!--- END INSERT EQUIPMENT TABLE DATA ---> <!--- USe this loop to scan the range of dates and insert data into the details table ---> <cfloop CONDITION="#CurrentDate# LTE #EndDate#"> <CFIF #Evaluate("Reg_#DateFormat(currentdate,'mmddyyyy')#")# GT 0> <CFQUERY name="InsertDetailRegData" datasource="xxxxxxxx"> INSERT INTO tblDetailEntry (DetailID,MainID,RecordDate,reghrs,othrs,shift,bill,attendance_code,comm ents,category_cd,pscode) VALUES (tbldetailentry_seq.nextval,#TheMainID#, to_date('#CurrentDate#','mm/dd/yyyy'), <!--- Process Missing Regular Hours ---> <CFIF #Evaluate("Reg_#DateFormat(currentdate,'mmddyyyy')#")# Is Not ""> #Evaluate("Reg_#DateFormat(currentdate,'mmddyyyy')#")# <CFINCLUDE template="GetAttendanceCode_Reg.cfm"> <CFELSE> 0 </CFIF>, <!--- Process Missing Overtime Hours ---> 0, <!--- All other fields will have a value ---> #Evaluate("shift_#DateFormat(currentdate,'mmddyyyy')#")#, <CFIF IsDefined("Bill_#DateFormat(currentdate,'mmddyyyy')#") > '#Evaluate("Bill_#DateFormat(currentdate,'mmddyyyy')#")#' <!--- If there is a value for Billing field then use that value to insert into database ---> <CFELSE> 'off' <!--- Otherwise set the BIlling field to off ---> </CFIF>, #Evaluate("attendancecode_#DateFormat(startdate,'mmddyyyy')#")#, <!--- Check for the existence of a Comment and Process if one exists ---> <CFIF IsDefined("Client.Comment_#Evaluate("#DateFormat(CurrentDate,'mmddyyyy') #")#")> '#Evaluate("Client.Comment_#Evaluate("#DateFormat(CurrentDate,'mmddyyyy' )#")#")#' <CFELSE> 'No Comment' </CFIF>, <CFIF IsDefined("Client.CommentCategory_#Evaluate("#DateFormat(CurrentDate,'mm ddyyyy')#")#")> '#Evaluate("Client.CommentCategory_#Evaluate("#DateFormat(CurrentDate,'m mddyyyy')#")#")#' <CFELSE> 'No Code' </CFIF>, <!---- Insert the PSCODE into the Details Table - 18-Nov-2001 ---> '#PSCodeReg#') </CFQUERY> </CFIF> <!--- CFIF Evaluate... ---> ---------------------------------------------------------------------- This same code is simply repeated for Overtime Hours. -Gel -----Original Message----- From: Douglas Brown [mailto:[EMAIL PROTECTED]] More than likely would need to see the code associated with the processing page. ----- Original Message ----- From: "Angel Stewart" <[EMAIL PROTECTED]> > I wrote an application that allows people to enter orders and time spent > on a system. > > Today is the first day that the system has gotten any sort of load > testing, although we attempted to do this previously. > > So today we are getting these types of errors, where it seems that Hours > from John, are appearing for employee Jim when John enters them. > > What the hell could be going wrong here? I am using more than one Insert > statement sometimes, as well as grabbing the next number in the sequence > from Oracle in order to do an insert using the code: > > <CFQUERY name="qryGetLastID" datasource="relora" dbtype="Oracle80"> > > SELECT tblmainentry_seq.nextval AS ID > > FROM dual > > </CFQUERY> > > It is wrapped in a CFTRANSACTION though, to attemtp to avoid this. But > the input process is so complicated that there are several CFIF > statements to check for conditions before final Inserts are written and > to build insert statements dynamically. > > Any ideas? > > -Gel ______________________________________________________________________ Get Your Own Dedicated Windows 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=coldfusionb 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