Monday, March 19, 2012

I can not return the rows affected

I can not return the rows affected by just using
int a = myCommand.ExecuteNonQuery(); because the return is always -1
I have to use an Output parameter in my SP all the time.. anybody knows WHY?
'Do you have 'SET NOCOUNT ON' somewhere in your stored procedure or as a
default setting? This can cause the behavior you're seeing.

No comments:

Post a Comment