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
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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

Reply via email to