Search code examples
sql-server-2008delete-row

Sql server does allow to insert a row into a table, but does not allow to delete or update it


I have a table named Project, it has single primary index named Project_Id. Primary index also has IDENTITY specification.

I can freely insert new row into the Project table, but then I cannot edit it, nor delete it. Here is the error it shows after the attempts:
enter image description here

Here is my data from the table:enter image description here

I want to delete those rows with id=17, 18, 19, 20. But I can't. Please also notice that I have no other table in my DB that references those id's in Project table, so I should be able to delete rows.

Any soughts about this? Do I need to provide more information for you to be able to pinpoint solution? Here is my relations diagram (a bit big, but anyway here it is):enter image description here

Just found out, that I can't update\delete rows even in Orders table (look right and up at diagram). I'm curious why...


Solution

  • I wonder if the error message is a red herring and this is actually a permissions issue. Can you update or delete rows in any table? Have you checked the permissions for the database user ?