SUNIL GUTTA

SUNIL GUTTA

  • NA
  • 1k
  • 394k

Primary key duplication ? using ADO.net

Oct 9 2013 3:55 AM
Hi

Well i tried to insert records into DB from created web-form . I used string.format(insert statement ) & Data reader :)


Initially 1st insert is going successfully but second insert popping some dam error like below 


Violation of PRIMARY KEY constraint 'PK_studentform'. Cannot insert duplicate key in object 'dbo.studentform'.
The statement has been terminated.







I maintained uniqueness in Pk column but why am i facing this ??


Please help me 



Answers (10)