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

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -