Monday, March 26, 2012

Row will not update or delete using Database Explorer (VWD Express)

Hi

I'm trying to update a database table through Database explorer and occassionally when I try to change an entry it will not update or delete. I therefore have a corrupt record which I can't get rid off and therefore can't use the table. The error report is as follows:

"...A problem occurred attempting to delete row 29

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows)

Correct the errors and attempt to delete the row again or press ESC to cancel the change(s)..."

All columns allow Nulls and there is no primary key or foreign key relationships with other tables.

Can anyone suggest what I am doing wrong or will I just have to resort to data entry using an ASP.Net control such as Detailsview.

Cheers

Chris


Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows)

In SQL Server, there MUST be a way to uniquely identify a row for a DELETE or UPDATE action. IF the row(s) you are attempting to DELETE are duplicate to other rows, you will not be allowed to delete them.

You options are to create either an IDENTITY field in the table, or a PRIMARY KEY -both of which will uniquely identify the row -allowing deletes to occur.

|||

Arnie

Thank you for your quick response and for your clear explanation as to the problem. I can now delete the rows.

Many thanks

Chris

No comments:

Post a Comment