c# - How to get number of rows affected by ExecuteNonQuery and ignore rows of triggers? -
i using executenonquery
run insert proc, returns 2, in actual inserting 1 record. getting 1 due trigger. there anyway actual number of rows affected. not want rows affected trigger.
if don't have already, disable counting rows in trigger:
set nocount on
for example:
create trigger [dbo].[triggername] on [dbo].[tablename] after insert set nocount on; ......
Comments
Post a Comment