Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Triggers and replication problem

2 posts in Replication Last posting was on 2011-11-03 12:04:17.0Z
mike grace Posted on 2011-11-03 11:02:19.0Z
Date: Thu, 3 Nov 2011 11:02:19 +0000 (UTC)
Message-ID: <b9f6cef8110ff8ce682f30f47e68@devzone.advantagedatabase.com>
From: mike grace <mikeg@computastat-group.co.uk>
Subject: Triggers and replication problem
Newsgroups: Advantage.Replication
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1; format=flowed
X-Newsreader: JetBrains Omea Reader 1098.1
NNTP-Posting-Host: 188.220.18.141
X-Trace: 3 Nov 2011 04:01:56 -0700, 188.220.18.141
Lines: 33
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Replication:475
Article PK: 1134329

Hi,

I have a replication issue where I have a field called STARTDATE in my source
table but the same field is called DATE in the destination table.

As there is no mapping of fields facility in ADS for replicaton, I added
STARTDATE into the destination table. This replicates fine.

I need the 'DATE' field populated in my destination table so I wrote a trigger
for after insert and after update events which both look like this.


// Update the old DATE field with the contents of start date
// this is needed so old R&R Reports continue to work.

UPDATE TCARD SET DATE = (SELECT STARTDATE FROM __new)
WHERE ROWID = (SELECT ROWID FROM __new);


This trigger works fine if I edit the table in arc. It all works as expected,
however, when replication inserts or updates the destination table, the triggers
do not fire.

Is there something I am doing wrong?

I am using ADS 10.

Regards


Mike


mike grace Posted on 2011-11-03 12:04:17.0Z
Date: Thu, 3 Nov 2011 12:04:17 +0000 (UTC)
Message-ID: <b9f6cef8111328ce6837d8efcea7@devzone.advantagedatabase.com>
From: mike grace <mikeg@computastat-group.co.uk>
Subject: Re: Triggers and replication problem
Newsgroups: Advantage.Replication
References: <b9f6cef8110ff8ce682f30f47e68@devzone.advantagedatabase.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1; format=flowed
X-Newsreader: JetBrains Omea Reader 1098.1
NNTP-Posting-Host: 188.220.18.141
X-Trace: 3 Nov 2011 05:03:54 -0700, 188.220.18.141
Lines: 43
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Replication:476
Article PK: 1134327

OK,


So I have just read that only the conflict trigger is fired when doing replication.

Thats stuffed me completely.


Mike

> Hi,
>
> I have a replication issue where I have a field called STARTDATE in
> my source table but the same field is called DATE in the destination
> table.
>
> As there is no mapping of fields facility in ADS for replicaton, I
> added STARTDATE into the destination table. This replicates fine.
>
> I need the 'DATE' field populated in my destination table so I wrote a
> trigger for after insert and after update events which both look like
> this.
>
> // Update the old DATE field with the contents of start date // this
> is needed so old R&R Reports continue to work.
>
> UPDATE TCARD SET DATE = (SELECT STARTDATE FROM __new)
> WHERE ROWID = (SELECT ROWID FROM __new);
> This trigger works fine if I edit the table in arc. It all works as
> expected, however, when replication inserts or updates the destination
> table, the triggers do not fire.
>
> Is there something I am doing wrong?
>
> I am using ADS 10.
>
> Regards
>
> Mike
>