Classic ASP DatabasesDiscuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases 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
I am getting an error message when trying to add record to SQL server database: ODBC Drivers error '80040e2f' Microsoft ODBC SQL Server Driver[SQL Server}Violation of Primary KEY constraint 'PK_1_11'. Cannot insert duplicate key in object 'advertisers'.
Cool. So your Primary Key protection mechanism seems to work....
And now what? Do you have a question, or did you just want to share this with us? ;)
It may help if you'd describe the issue in some more detail; explain the current situation, explain what code you're using, and explain what you're running into. Merely dumping an error message isn't very useful.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Well I think it's pretty obvious that this person is hoping to avoid errors like this. We probably shouldn't give them too hard-o-time eh...
ssa04Micki...The error is telling you that you are trying to enter a duplicate entry into your primary key field within your Advertisers table. Primary keys cannot have duplicate entries. Make sure you are entering a value that is unique from any other values for that field when you do your update.