>>>>What am I missing?
>>>
>>>Have you tried running this exact command (copy and paste it in SSMS)?
>>
>>Yes, the result says, "1 row(s) affected". So I presume the record should have been deleted. But then I Select it and it is there. Strange.
>
>Are you sure you're testing in the exact same database?
>
>E.g. you run
>execute 'delete ...
> select * from myTable where PK = ...
>
>---------------
>Also, do
>
>select @@TRANCOUNT
>
>just in case to see the current transaction count.
>
>If the row is not deleted after you ran these two commands (delete following by select), then you need to check the triggers.
If you look at Borislav's code it checks all that. And still the record is not deleted. And no triggers at all in this database.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham