MS SQL triggers are called once per batch - they are post operation trigger,
meaning the insert happened then trigger is called, but before the
transaction is committed.

> I found
> the insert trigger only been trigged once, the inserted buffer only hold
> last inserted record's data.

That is incorrect - the inserted recordset will contain all inserted
records.

Regards,
Dennis.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 3 August 2001 22:00
> To: Multiple recipients of list delphi
> Subject: [DUG]: MS SQL trigger
>
>
> Hi all,
>
> I have a INSERT trigger for a table, when I am inserting multiple records
> into the table by "insert the_table select * from another_table", I found
> the insert trigger only been trigged once, the inserted buffer only hold
> last inserted record's data. Why? How can I let the trigger run as many
> times as the number of records, so each time I can do something on each
> record individually?
>
> Regards,
>
> Jim
>
> ------------------------------------------------------------------
> ---------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to