ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.ASP.Net Error: Violating the Primary Key constraint. can not insert the duplicate key into the object<p>Hi&nbsp;phonghue,</p> <p>You are trying to insert a duplicate&nbsp;value in&nbsp;dbo_Students table.</p> <p>You can set auto increment for the column and then there should never be a problem with duplicating the value, the database will take care of that.</p> <p>If you need to specify a value yourself, you'll need to write code to determine what the max value for that field is and then increment that to avoid the duplication.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/151303/ASPNet-Error-Violating-the-Primary-Key-constraint-can-not-insert-the-duplicate-key-into-the-object/https://www.aspforums.net:443/Threads/151303/ASPNet-Error-Violating-the-Primary-Key-constraint-can-not-insert-the-duplicate-key-into-the-object/Tue, 23 Jul 2019 00:52:29 GMT