Page 2 of 2

How to write triggers?

Posted: Mon Jan 28, 2002 6:03 pm
by mark
$db and $table may be used in the create trigger statement and will be replaced with the names of the database and temp table respectively when triggermode is 1. See triggermode http://www.thunderstone.com/site/texisman/node154.html

So your trigger action might be, as above:
... shell '/path/to/script $db $table'

The file /path/to/script might contain

#!/bin/sh
/usr/local/morph3/bin/tsql -q -d "$1" "delete from orders where PID in (select PID from $2)"

How to write triggers?

Posted: Tue Jul 06, 2004 5:13 am
by josmani
I have created an update trigger on a table as suggested in this article. I can see the trigger is being fired when I update a record but I get this error message and the shell script does not run.

002 Can't open KDBF file C:\TEMP\trigAAA.AAA.blb for writing: error 2: No such file or directory

Any ideas?

How to write triggers?

Posted: Tue Jul 06, 2004 11:52 am
by josmani
The directory exists and TMP as well as TEMP environment variables point to that directory.