Re: Violation of primary key

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 10/30/04


Date: Sat, 30 Oct 2004 16:08:27 -0500

I can't think of an accidental server or database setting change that would
cause this error to suddenly appear.

Did you make any design changes to your 'keycode' table (primary key)? If
not, this is probably a legitimate error due to attempting an insert of
duplicate data (same primary key) into the table.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"kitty" <kitty@discussions.microsoft.com> wrote in message 
news:861F5472-F042-484F-99F2-553A880CD019@microsoft.com...
> [Microsoft]]ddbc sql server driver][sql driver] violation of primary key
> constraint 'aaaaakeycode.pk'.  cannot insert duplicate key in object
> 'keycode'(#2627)[Microsoft]]ddbc sql server driver][sql driver] The 
> statement
> terminated.(#3621)
>
> Please help me, I am a newby and I was looking at the settings in my sql
> database and when i exited out I must have changed something  because I am
> getting the eror above.  I checked the settings but nothing seems 
> different.
> Please help me.  Where should I look first?  Second?
>
> Thanks
>
> Celia 


Relevant Pages

  • Re: Creating new settings on the fly
    ... add userid to the primary key, but that kind of seems like overkill. ... I'd probably use the settings. ... dataGridViews to display data, and many of them have 10-20 columns ... database, but the program is not multiuser and all users would share ...
    (microsoft.public.dotnet.languages.vb)
  • AutoNumber Random Number not Random
    ... I have a table structure that uses "Autonumber" for the ... data type (primary key) with the field size and new value ... settings as "Long Integer" and "Random." ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Violation of primary key
    ... You can prove this with a query like: ... primary key values of the data you are trying to insert and either skip the ... > to have deleted but I cannot find the one that is trunkating my database. ... I checked the settings but nothing seems ...
    (microsoft.public.sqlserver.server)
  • Re: Row cannot be located for updating
    ... > rows may occur if there is no primary key, ... >> settings be more appropriate? ... Should I use a server side cursor? ...
    (borland.public.delphi.database.ado)