|
Posted by Erland Sommarskog on 10/12/07 21:16
(tatata9999@gmail.com) writes:
> Very simple sql dml code (all the columns are of varchar of various
> length):
> insert into myTBL (col1,col2,col3)
> values ('#ranVar#','#FORM.element1#','#FORM.element2#')
>
> The err msg is:
> Violation of PRIMARY KEY constraint 'PK__myTBL__772828B3EFCA'. Cannot
> insert duplicate key in object 'myUsers'.<P><P> SQL = "insert into
> myTBL (col1,col2,col3) values
> ('342*783','signmeeup728392@student.org','s')" "
>
> Actually sql server has successfully captured one record. Don't know
> why it tries to capture it again. It would be nice to have many
> simultanous users to use/test it... If you don't mind,
> http://www.mytata.net/,
If I understood your initial post correctly, you generated the value
by some random process. Isn't it as simple that you are generating the
same value twice?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|