Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2005, 09:35 AM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Primary Key Violation error code

Just for your info, 2601 is the number used as the primary key violation code in the ThPhile.

However, 2601 was not working for me. VS.net debugger displayed 2627 as the error code. I used 2627 to catch primary key violation code, and it did work.


 
Old April 19th, 2005, 07:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the info - it would be wise to handle both of these errors.

SQL Error 2627:
Violation of UNIQUE KEY constraint '%.*ls'. Cannot insert duplicate key in object '%.*ls'.

SQL Error 2601:
Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Violation of PRIMARY KEY constraint??? twyce C# 1 September 9th, 2008 01:23 AM
Violation of primary key dhoward VB.NET 2002/2003 Basics 4 May 31st, 2007 10:19 AM
auto increment primary key-compile error junemo Oracle 2 June 16th, 2004 08:53 AM
primary key violation muralikeane Classic ASP Databases 8 May 21st, 2004 09:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.