That depends on how you do the bulk insert.

if you use BATCHSIZE then

"Specifies the number of rows in a batch. Each batch is copied to the server
as one transaction. SQL Server commits or rolls back, in the case of
failure, the transaction for every batch. By default, all data in the
specified data file is one batch."

> (even if it is in one SP that is called))

I think you'll need to ensure that you capture the return code and throw a
rollback in the trigger...

Also ensure that your trigger can cope with 2+ rows inserted at the same
time.

Justin

-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]
Sent: 02 February 2004 14:59
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] SQL Server BULK INSERT/Trigger/Stored Proc issue


Justin wrote:
> AFAIK in MS SQL Triggers are considered part of a insert transaction.

Does that mean that if you try to do a trigger on a bulk insert, and
something fails in the trigger (even if it is in one SP that is called)
the whole thing will NOT insert into the database?

If that's the case, then I may have to rethink the Trigger and the SP!

Paul

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to