Actually I have to to CHECK if its there and if its there to UPDATE and if its not their to INSERT but its throwing the damn error i guess the SERIALIZE ISOLATION level doesn not do what it says it says its supposed to keep those rows locked until the transaction is completed
Bill Wheatley Senior Database Developer Macromedia Certified Advanced Coldfusion Developer EDIETS.COM 954.360.9022 X159 ICQ 417645 ----- Original Message ----- From: "nagraj" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 12:04 PM Subject: Re: Annoying DB question > Hi Bill, > > It Seem that Same Primary Key Value is been inserted.You can do like > this.Prior Inserting You make a check if it is existing Give a message that > already existing else go with insertion.This way there is no chance of > Inserting on Refreshing the page also. > > With Regards > Nagaraj.A > > > ----- Original Message ----- > From: "Bill Wheatley" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, May 20, 2002 9:08 PM > Subject: Annoying DB question > > > > I'm having an issue > > "Error","TID=361","05/20/102","10:54:12","ODBC Error Code = 23000 > (Integrity constraint violation)<P> [Microsoft][ODBC SQL Server Driver][SQL > Server]Violation of PRIMARY KEY constraint 'PK benefit'. Cannot insert > duplicate key in object 'tblBenefit'.<P><P> SQL = "sp_newmeal" " > > > > Heres whats happening we have 8 rows in the db that hold meal plans > > when we change them we remove the old plans and insert new plans > > sometimes if you hit refresh enough it causes a ERROR above to be thrown. > > What i did was put the enter thing into a transaction with > > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE > > > > and it still throws the error when the SQL notes say it shouldnt happen > like that > > any ideas? thanks > > > > > > Bill Wheatley > > Senior Database Developer > > Macromedia Certified Advanced Coldfusion Developer > > EDIETS.COM > > 954.360.9022 X159 > > ICQ 417645 > > > > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.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

