how to use trigger in bulk insert

Posted by Santosh4u under VB.NET on 3/18/2011 | Points: 10 | Views : 4625 | Status : [Member] | Replies : 1
Hi Friends,
plz anyboby help me on this.....

i am inserting the records in a table using bulk insert and i want to insert the same records in another table using trigger.
my trigger is working if i m inserting records in backend but it's not working through bulk insert.
even i tried to fire trigger front end(in also same result .

how can i fire trigger in bulk insert...........



Posted by: SheoNarayan on: 3/18/2011 [Administrator] HonoraryPlatinum | Points: 25

Hi Santhosh,

Triggers are fired once per statement not per row on the database. So you need to change the way you are inserting bulk records.

Have a look at this msdn article that explains how to use triggers in Bulk insert.

Below two threads might also help you.


Sheo Narayan

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response