Cannot insert duplicate key row in object <tablename> with unique index
From: Brian Barnes (spamme_at_nospam.com)
Date: 07/01/04
- Next message: Bill Cheng: "RE: Calling stored procs on AS/400"
- Previous message: Aaron [SQL Server MVP]: "Re: Hotfix fixed my SQL Server"
- Next in thread: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Reply: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Reply: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 1 Jul 2004 14:35:04 +1200
Hi all,
Basically I have 2 tables (tblEntitys and tblEntityDetailsEvent) (well more,
but I get the error with 2 tables) that are related based on a guid. I'm
sure SQL server does not know this (I'm using guids extensively in this
database), and both have a guid and date/time Primary key (as this operates
similar to backing up a database into another database). One table appears
to back up fine, but the second table comes up with this error "Cannot
insert duplicate key row in object tblEntityDetailsEvent with unique index
'tblEntitiestblEntityDetailsEvent'" The date time is set to date.now in the
web service that writes to the SQL server database and therefore there
should be no key collisions (although there will be guids with a number of
dates and dates with a number of guids) - this is shown in the table that
backs up fine.
Basically as this database was upsized (and then a few extra columns (the
datetime column was added) and tables were added) from Access which did have
the relationship stated (I also added a diagram that stated this, and have
since deleted it - now there are no diagrams in SQL Server), is there
something I need to add or delete to ensure that this works? or have I
missed somthing completely.
-- Brian Barnes
- Next message: Bill Cheng: "RE: Calling stored procs on AS/400"
- Previous message: Aaron [SQL Server MVP]: "Re: Hotfix fixed my SQL Server"
- Next in thread: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Reply: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Reply: Bill Cheng: "RE: Cannot insert duplicate key row in object <tablename> with unique index"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|