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; ...... 

msdn


Comments

Popular posts from this blog

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -