Hi guys,
I have a weird problem - I wonder if someone could spare a second for me. I have posted this exact question in the SQL Server forum but was advised to post it here instead.
I am running a DELETE statement inside a T-SQL Stored Procedure (for my C# .NET application). It's as simple as they get.
However, when I call ExecuteNonQuery () I always get back 0. I have tried...
...in all sorts of places inside the procedure, yet it still always returns 0. I am certain that one row will be deleted as I have ran the query inside Management Studio and it said that one row was affected, plus I have checked the table itself.
I am very familiar with this setup and have used it all over my application, but for some reason this time it just won't work. I've tried renaming the procedure, debugging the return value from ExecuteNonQuery () and rewriting the procedure but nothing appears to work.
Does anyone have any clues? Thanks for your time.
Chris
I have a weird problem - I wonder if someone could spare a second for me. I have posted this exact question in the SQL Server forum but was advised to post it here instead.
I am running a DELETE statement inside a T-SQL Stored Procedure (for my C# .NET application). It's as simple as they get.
Code:
DELETE FROM groupPromotionRequests WHERE groupPromotionRequestId = @requestId;
Code:
SET NOCOUNT OFF;
I am very familiar with this setup and have used it all over my application, but for some reason this time it just won't work. I've tried renaming the procedure, debugging the return value from ExecuteNonQuery () and rewriting the procedure but nothing appears to work.
Does anyone have any clues? Thanks for your time.
Chris
Comment