June 8, 2008 at 2:10 am
Hi,
1. open a table data in SQL2005 then select one row
2. right click on selected row and press delete
system deletes that record without any problem but when repeating the above scenario for more than one row it shows an error indicating that primary ID of ... (a non selected ID) is not removable
any idea is appreciated ( I know there's other way to do that easily but I'm just curious about this 😉 )
June 8, 2008 at 12:41 pm
I can't duplicate the error. In other words, I get no error unless certain rows are being used by foreign keys.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 8, 2008 at 9:28 pm
Jeff beat me to it - but that does sound an awful lot like a foreign key error.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
June 8, 2008 at 10:50 pm
There's no foreign key defined:ermm:
thanks for your replies anyway 🙂
June 8, 2008 at 11:11 pm
Have you created any function, stored procedure, trigger or Constraint for that table. If you have created any of the above for primary key, then also it will give problem.
Preetha SG
June 8, 2008 at 11:22 pm
preetha.sathyamoorthy (6/8/2008)
Have you created any function, stored procedure, trigger or Constraint for that table. If you have created any of the above for primary key, then also it will give problem.Preetha SG
That's the case :hehe: there's a function defined. but I wonder why it can be deleted via DELETE query?!
June 8, 2008 at 11:31 pm
Hi
What does the function do?
"Keep Trying"
June 8, 2008 at 11:36 pm
I think,the data you deleted with DELETE query is not matched with the function definition.
Preetha SG
June 9, 2008 at 1:40 am
Could you post the table definition (and function)?
Is there a computed column in this table?
Wilfred
The best things in life are the simple things
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply