Home > Archive > SQL Anywhere Mobile > July 2005 > Send triggers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Send triggers
MJN

2005-07-28, 9:25 am

Am using the fire triggers and send triggers extended options set to "ON"
for my remote db's.
This is due to having rows inserted by triggers on the remotes.
There are no triggers on the consolidated.
Problem I am having is my inventory is getting screwed up due to the
triggers being sent on the consol.
Is there any way to only send certain triggers??

Lastly I know it is bad design to have inserts relying on triggers but am
trying to avoid rewriting alot of code..

Any ideas??

Thanks

ASA9.02


David Fishburn

2005-07-28, 1:39 pm

"MJN" < SpamFilterOnlychuck1
rar@yahoo.com> wrote in
news:42e8e2ad@forums
-2-dub of sybase.public.sqlanywhere.mobilink:

M> Am using the fire triggers and send triggers extended options set to
M> "ON" for my remote db's.
M> This is due to having rows inserted by triggers on the remotes.
M> There are no triggers on the consolidated.
M> Problem I am having is my inventory is getting screwed up due to the
M> triggers being sent on the consol.
M> Is there any way to only send certain triggers??
M>
M> Lastly I know it is bad design to have inserts relying on triggers but
M> am trying to avoid rewriting alot of code..

<hack>

You could modify your triggers to check if they are executing on a
dbmlsync connection. If so, do nothing (or whatever).

You could put something like this in your trigger code:
IF( LOCATE( connection_property(
'Name'), 'DBMLsync' ) = 0 ) THEN
-- This is NOT a dbmlsync connection ...
END IF;

</hack>
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com