| Jeremy Swift 2005-04-21, 1:23 pm |
| Eddie,
The reason your trigger isn't updating the remotes is that it is
firing as a consequence of an incoming replicated change. The change
isn't replicated back to prevent the possiblility of an infinite
ping-pong should a further change be triggered at the remote.
If the requirement is for unique numbering but you don't mind gaps
then an easier solution would be to use the global autoincrement
functionality to set up discrete ranges in each database and apply the
values at the point of entry, rather than at consolidation.
Jeremy
On 1 Mar 2005 13:00:18 -0800, "Eddie Sizemore"
<esizemoreno@spamqx.net> wrote:
>It is a before trigger. I will have to do some testing to see what the
>problem is.
>
>The rows that have a problem are inserted at the remote dbs and the trigger
>is only on the consolidated db. I don't think the remote that did the
>insert gets the update. I have included the trigger script.
>
>ALTER trigger
>dba.tib_job before insert on dba.Job
>referencing new as new_ins
>for each row begin
> declare UserCode integer;
> select max(Job.UserCode) into UserCode from Job where Job.CustomerID =
>new_ins.CustomerID and Job.CustomerPub = new_ins.CustomerPub;
> set UserCode=ifnull(User
Code,1,UserCode+1);
> set new_ins.UserCode=UserCode
>end
>
>"Reg Domaratzki (iAnywhere Solutions)" < Spam_bad_rdomarat@ia
nywhere.com>
>wrote in message news:4224b2c0@forums
-1-dub...
>
|