c# - SET NO Count ON in SQl Server Causes an issue with ExecuteNonQuery -
according of sql texts have seen
set nocount on
add's db performance , dba's don't see off.
however in asp.net i'm dealing , causes
calling stored procedures using executenonquery
result in -1.
is known issue , if workaround?
so question how have set nocount on
, executenonquery
return number of rows affected.
this question 'executenonquery
' only. know can use executescalar
, @@rowcount
what else did expect? explicitely tell database not count rows , asking why counted rows not returned?
the database not deliver number of rows affected, because turned off. that's neither issue nor bug, that's whole point of did.
Comments
Post a Comment