View Single Post
  #4 (permalink)  
Old April 27th, 2007, 07:29 AM
happygv happygv is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry, I over looked it. I read your post yet again carefully. Your code violates the UNIQUE constraint. When you say you know that duplicates can happen and still trying to insert into a table where UNIQUE contraint is set, you should be handling it such that you ignore duplicates and allow INSERT, using a where clause. Else you shouldn't be setting Unique constraint.

How are you executing this statement from your application? Are you using a Stored proc with BEGIN TRAN and ROLLBACK/COMMIT TRAN statements something like that?

_________________________
- Vijay G
Strive for Perfection