Trigger problem

User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Trigger problem

Post by John »

The script can go whereever you want, specifying the full path in the trigger. Adding the /main.txt should suppress the output.

e.g. ... SHELL 'c:\morph3\texis.exe -r db=$db table=$table tbname=project c:\morph3\texis\scripts\populatelog/main.txt'
John Turnbull
Thunderstone Software
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

That suppresses the output when I insert at the TSQL prompt, but I still get the same error when the insert originates in the Vortex code.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Trigger problem

Post by Kai »

What version of Texis are you using?
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

Texis Web Script (Vortex) Copyright (c) 1996-2010 Thunderstone - EPI, Inc.
Commercial Version 5.01.1268856485 20100317 (i686-intel-winnt-64-32)
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Trigger problem

Post by mark »

Is the vortex script that's causing the trigger running from the command line or from web access?
If from web I wonder if it's getting tricked into thinking it's in CGI mode and tripping up.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

It is running from web access, as CGI.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

Any further insight into what might be causing the error I'm seeing or what I might doing wrong?

Thanks
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Trigger problem

Post by Kai »

It looks like an issue with how triggers are executed by Texis. Try rewriting your Vortex trigger like this:

<a name=main>
<vxcp htmlmode off>
<capture>
... trigger code goes here ...
</capture>
</a>

to suppress output.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

Maybe I'm doing something wrong, but I'm still getting the same error. Here is my trigger code:

<script language=vortex>
<a name=main>
<db=$db>
<vxcp htmlmode off>
<capture>
<sql row "select * from " $table>
<sql novars "insert into logproject(logid, tablename, id, p_equivs, c_equivs, name) values (counter, $tbname, $id, $p_equivs, $c_equivs, $name)">
</sql>
</sql>
</capture>
</a>
</script>

The name of the file of the code above is populatelog.

Here is the trigger definition:

set triggermode=1; create trigger project_insert_T after insert on project FOR EACH ROW SHELL 'texis.exe -r db=$db table=$table tbname=project populatelog/main.txt'
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Trigger problem

Post by barry.marcus »

I also tried simplifying to this:

<script language=vortex>
<a name=main>
<vxcp htmlmode off>
<capture>
<db=$db>
<sql row "select * from " $table>
<sql novars "insert into logproject(logid, tablename, id, p_equivs, c_equivs, name) values (counter, $tbname, $id, $p_equivs, $c_equivs, $name)">
</sql>
</sql>
</capture>
</a>
</script>

Just is not working. :-(
Post Reply