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.

Server Side Processing When Replicating

2 posts in Replication Last posting was on 2006-12-18 16:30:34.0Z
Rick Dowling Posted on 2006-12-13 02:13:23.0Z
Reply-To: "Rick Dowling" <rick@barcode.com.au>
From: "Rick Dowling" <rick@barcode.com.au>
Newsgroups: advantage.Replication
Subject: Server Side Processing When Replicating
Date: Wed, 13 Dec 2006 13:13:23 +1100
Lines: 49
Organization: Barcode Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 138.130.114.80
Message-ID: <457f60c2@solutions.advantagedatabase.com>
X-Trace: 12 Dec 2006 19:09:06 -0700, 138.130.114.80
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!138.130.114.80
Xref: solutions.advantagedatabase.com Advantage.Replication:148
Article PK: 1134006

Hi,

For a retail application where each site will be running ADS and there will
be a head office where the sites will replicate sales, customer details etc
with.

What im attempting to do is when a sale is done (Site 1) and a new record
added to the SALES table and this table is replicated (to Server), that on
the server it takes this record and updates its SALES table with the record,
but also updates the total sales figures for that customer in the CUSTOMER
table (then replicates that update back to Site 1).

Now i thought triggers would be my ticket, but having read the documentation
ive found that only the ON CONFLICT trigger can be fired when replicating
(and because there wont be an error ideally, this wont suit me).
I would like to avoid updating the customer locally, instead having the
server managing it.

Is there a way i can trigger some type of processing to be done when an
Insert is done on the SALES table to then take some of the new records
details and do an UPDATE to the CUSTOMER table ? (that does not require my
application, which lets pretend for a moment that its not written yet, to do
the processing to the CUSTOMER table itself)

Any help would be appreciated.
Thanks

--


Rick Dowling
Analyst Programmer

Barcode Solutions


--






Rick Dowling
Analyst Programmer

Barcode Solutions


Paul Man Posted on 2006-12-18 16:30:34.0Z
From: "Paul Man" <paulman@datasoft.ie>
Newsgroups: advantage.Replication
References: <457f60c2@solutions.advantagedatabase.com>
Subject: Re: Server Side Processing When Replicating
Date: Mon, 18 Dec 2006 16:30:34 -0000
Lines: 69
Organization: DSoft
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 82.141.233.142
Message-ID: <4586c155@solutions.advantagedatabase.com>
X-Trace: 18 Dec 2006 09:27:01 -0700, 82.141.233.142
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!82.141.233.142
Xref: solutions.advantagedatabase.com Advantage.Replication:149
Article PK: 1134007

I'm doing the exact same scenario as you ( retail application also ). My
way is to replicate the sales from the POS site to the head office. Then
the Head office recalculates the customer balance and the customer record is
replicated down to the POS site.

So. POS site publishes sales and HO site subscribes.
HO site published customer records and POS site subscribe to changes.

both sites can have an update trigger on sales to update the customer
balances but in my case the Head Office controls the customers and can issue
credit notes etc so that it's changes overrule the POS site. I also use a
rowversion field to in another similar sceanrio indicate which customer type
records should be updated depending on sales updates by an monitoring agent
program.

"Rick Dowling" <rick@barcode.com.au> wrote in message
news:457f60c2@solutions.advantagedatabase.com...
> Hi,
>
> For a retail application where each site will be running ADS and there
> will be a head office where the sites will replicate sales, customer
> details etc with.
>
> What im attempting to do is when a sale is done (Site 1) and a new record
> added to the SALES table and this table is replicated (to Server), that on
> the server it takes this record and updates its SALES table with the
> record, but also updates the total sales figures for that customer in the
> CUSTOMER table (then replicates that update back to Site 1).
>
> Now i thought triggers would be my ticket, but having read the
> documentation ive found that only the ON CONFLICT trigger can be fired
> when replicating (and because there wont be an error ideally, this wont
> suit me).
> I would like to avoid updating the customer locally, instead having the
> server managing it.
>
> Is there a way i can trigger some type of processing to be done when an
> Insert is done on the SALES table to then take some of the new records
> details and do an UPDATE to the CUSTOMER table ? (that does not require my
> application, which lets pretend for a moment that its not written yet, to
> do the processing to the CUSTOMER table itself)
>
> Any help would be appreciated.
> Thanks
>
> --
>
>
> Rick Dowling
> Analyst Programmer
>
> Barcode Solutions
>
>
> --
>
>
>
>
>
>
> Rick Dowling
> Analyst Programmer
>
> Barcode Solutions
>
>