View Single Post

   
  #4 (permalink)  
Old 03-01-2008, 03:42 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Would special character cause insertion problem?

(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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Reply With Quote