I wrote following trigger, this trigger have strange behavior, that is it
sometime works and some time it does not work. It is on Insert only. The
source file "COSTFILE" is get new records via Replication. However when I do
manual test work just fine.
Do anybody have any idea what might be going on.
CREATE TRIGGER Insert_Into_NewItems
insert into "\\172.16.7.7\c$\DB\BackOffice\BackOffice.Add".NewItems (
Order_Num,Current_Date(),Current_Time() from __New a
inner join Vendor b
Subject: Trigger Behavior,
Date: Thu, 28 Dec 2006 09:22:30 -0500
X-Newsreader: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896
X-Trace: 28 Dec 2006 07:23:42 -0700, 220.127.116.11
Xref: solutions.advantagedatabase.com Advantage.Trigger:298
Article PK: 1136364
From: Edgar Sherman <firstname.lastname@example.org>
User-Agent: Thunderbird 18.104.22.168 (Windows/20061207)
Subject: Re: Trigger Behavior,
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: 2 Jan 2007 10:39:19 -0700, 10.24.34.110
Xref: solutions.advantagedatabase.com Advantage.Trigger:299
Article PK: 1136366
when using replication the only trigger to fire will be the "Conflict"
---- Snip from Help file -----
When a replication update is performed at the target database, the only
trigger type that will be executed is the CONFLICT trigger. The reason
for this is because triggers can write different data to the record than
is provided in the original update. If the trigger at the target were
fired, it would be using different data than was available at the
source. Replication will distribute that actual data that is written at
the source to the target.
--- /Snip ---
Be sure to include all tables in replication (Base table, and any other
tables updated by triggers). Then each table will replicate the changes.