IMMEDIATE help appreciated 
Author Message
 IMMEDIATE help appreciated
Here's the SQL:
update MatchStatus set question_num = 1 where userid = 'sudermatt'

Here's the error:
Microsoft OLE DB Provider for SQL Server error '80040e14'

Cannot insert duplicate key row in object 'MatchStatus' with unique
index 'IX_MatchStatus'.

I'm trying to do an update from an ASP page.....why is the Index
getting in the way of the update?

Thanks,
Matt

Sent via Deja.com http://www.***.com/
Before you buy.



Wed, 18 Dec 2002 03:00:00 GMT
 IMMEDIATE help appreciated


Quote:

> Here's the SQL:
> update MatchStatus set question_num = 1 where userid = 'sudermatt'

Here's some more data..
IX_MatchStatus is on
userid
question_num
question_ans

Quote:

> Here's the error:
> Microsoft OLE DB Provider for SQL Server error '80040e14'

> Cannot insert duplicate key row in object 'MatchStatus' with unique
> index 'IX_MatchStatus'.

> I'm trying to do an update from an ASP page.....why is the Index
> getting in the way of the update?

> Thanks,
> Matt

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Dec 2002 03:00:00 GMT
 IMMEDIATE help appreciated
Matt,

Your index has been created with the UNIQUE property ... that means that you are
telling SQL Server to reject data if two rows would have the exact same values
for the keys (userid, question_num, question_ans).

Execute the following SELECT ...

SELECT userid, question_num = 1, question_ans
FROM MatchStatus
WHERE userid = 'sudermatt'
ORDER BY userid, question_num = 1, question_ans

If two or more rows from the result set from the SELECT show identical output,
then that is what SQL Server is objecting to.

---------------------------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc) which can be
cut and pasted into Query Analyzer is appreciated.

Quote:



> > Here's the SQL:
> > update MatchStatus set question_num = 1 where userid = 'sudermatt'
> Here's some more data..
> IX_MatchStatus is on
> userid
> question_num
> question_ans

> > Here's the error:
> > Microsoft OLE DB Provider for SQL Server error '80040e14'

> > Cannot insert duplicate key row in object 'MatchStatus' with unique
> > index 'IX_MatchStatus'.

> > I'm trying to do an update from an ASP page.....why is the Index
> > getting in the way of the update?

> > Thanks,
> > Matt

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Dec 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Ado Help Please Help any help is appreciated

2. Transaction Replication Problem (Immediate Update / Queued when Immediate fails)

3. query help appreciated. max()/joins/subquery

4. ****ANY HELP APPRECIATED**********

5. Appreciate your help

6. Standalone installation of SQLserver 6.5 your help is appreciated

7. Good Reporting Tool for VB to SQL (Currently Use Crystal) or Crystal w/SQL Help Appreciated

8. Design help appreciated

9. Any help is appreciated!!

10. SQL 7 DTS export to VFP- any help appreciated

11. Problem with OLAP SP2 : Urgent help appreciated


 
Powered by phpBB® Forum Software