MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Tue May 22, 2001 2:18 pm
I have a table that has a trigger on it so that when a record is deleted from the table it is transfered to another table. Is there a way to allow a vortex script to override the trigger so that under certain conditions its not triggered...
M.
John
Site Admin
Posts: 2622 Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:
Post
by John » Tue May 22, 2001 2:55 pm
You can issue the following SQL to prevent triggers from being run.
<SQL "set options='triggers'"></SQL>
This should obviously be done with care to prevent unintended consequences.
John Turnbull
Thunderstone Software
MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Tue May 22, 2001 2:57 pm
Weird.. I didnt see that in the documentation anywhere.. what other values does nooptions accept.
MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Tue May 22, 2001 2:58 pm
Looks to me that I can't use that feature with my version or something like that..
<!-- 100 processuploads:12: Unknown option triggers in the function set option -->
<!-- 200 processuploads:12: set nooptions='triggers'; -->
John
Site Admin
Posts: 2622 Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:
Post
by John » Tue May 22, 2001 3:19 pm
That is the only option currently known by nooptions. The error message is in error, if you have nooptions then it does know the triggers option, and it will apply.
John Turnbull
Thunderstone Software
MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Tue May 22, 2001 3:36 pm
It doesn't appear to be working in my version of Texis. I should only have to invoke it once at the beginning of the script, right??
this is my version.
Texis Web Script (Vortex) Copyright (c) 1996-2000 Thunderstone - EPI, Inc.
Commercial Version 3.01.971289085 of Oct 11, 2000 (alpha-dec-osf4.0)
John
Site Admin
Posts: 2622 Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:
Post
by John » Tue May 22, 2001 5:04 pm
It will work in that version. It will only apply to the database you are connected to. If you switch database, or issue <sqlcp cache close> then they setting will be lost.
John Turnbull
Thunderstone Software
MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Tue May 22, 2001 5:08 pm
Hmm... I put it in the script but the triggers are stilling being fired off.. here is the script.
<script language = vortex>
<db=/db/tables/maint>
<timeout = -1></timeout>
<A NAME=main>
<SQL "set nooptions='triggers'"></SQL>
<sql "select USER_ID, USER_REC from deltas">
<sum "%s
" $USER_ID $USER_REC>
<SQL ROW "delete from books where USER_ID\USER_REC = $ret"></SQL>
$loop
</sql>
</A>
</script>
John
Site Admin
Posts: 2622 Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:
Post
by John » Tue May 22, 2001 5:21 pm
I got the option reversed the first time, you have to specify it as:
<SQL "set options='triggers'"></SQL>
John Turnbull
Thunderstone Software
MiniMe
Posts: 210 Joined: Thu Mar 15, 2001 4:30 pm
Post
by MiniMe » Wed May 23, 2001 3:24 pm
Should I be concerned with this error??
<!-- 100 /db/schemas/uploads:316: Unknown option triggers in the function set option -->