Thanks to David and Sammy for your suggestions.
I have found out what was going on - the trigger below (t_topics_Delete)
was somehow interfering. I deleted the trigger, and the DELETE statement
worked, with no weird error message!
Now I have to figure out what the trigger was doing (I didn't write it),
and see what functionality has been lost by removing it and now has to be
replaced in some other way (that doesn't screw up the DELETE!)
Thanks again,
JON
Create Trigger t_topics_Delete
On dbo.t_topics
For Delete
As
Declare @topic_id int
select @topic_id = (select topic_parent from deleted)
if @topic_id=-1
begin
DELETE a FROM t_topics a , deleted b WHERE
(a.topic_parent = b.topic_id)
end
else
update a set a.topic_count = a.topic_count -1 from
t_topics a, deleted b where a.topic_id = b.topic_parent