Page 1 of 2

State table variables

Posted: Thu Oct 06, 2005 6:32 am
by webinatoruser
Is there any special way of referencing exported state table variables? I have exported one variable with the export directive: <EXPORT $q TABLE> and I cannot access it in subsequent invocations. I tried to print $url at the top of each script to ensure the exported variables are getting set to no avail. The value varies in size and can therefore be too large to place in the url.

State table variables

Posted: Thu Oct 06, 2005 9:49 am
by John
The value of $q when you first print $url will be saved and can then be accessed as $q when you use $url to generate links to subsequent invocations. You do need to make sure the value you want stored is set when you first print $url.

You can look in the "vortex" table to see the variables stored.

State table variables

Posted: Thu Oct 06, 2005 10:07 am
by webinatoruser
The value is set in a form submission. I submit the form and the subsequent page has a dummy $url printed at the top of the script and I know $q is set because it is available as a form variable and it is displayed. If I then click on any link from this page to a subsequent page, $q is lost even though $url is used in each link. I know this works if I export to url, but I don't want to do that for the reasons stated above. I assumed that if it works for the URL flag it should be the same for the TABLE flag?

State table variables

Posted: Thu Oct 06, 2005 12:10 pm
by webinatoruser
Should I be concerned with the following error message:

<!-- 176 /search:43: Table vortex already exists in data dictionary -->
<!-- 000 /search:43: SQLPrepare() failed with -1 -->

State table variables

Posted: Thu Oct 06, 2005 2:36 pm
by Kai
Yes; perhaps the vortex table was lost. Run this:

texis -W

to drop and re-create it.

State table variables

Posted: Thu Oct 06, 2005 2:47 pm
by webinatoruser
I did that and I still get the error message every time I am printing $url in the script.

If I do it as you suggest, it is dropping and recreating the vortex table in the testdb directory. I suppose, since my database is somewhere else I need to provide the path to my own database? I tried this texis -W -d /database/mydb
But I get this error:
176 Table vortex already exists in data dictionary in the function createdbtbl
000 SQLPrepare() failed with -1 in the function prepntexis

State table variables

Posted: Fri Oct 07, 2005 11:45 am
by Kai
Which version of texis is this (output of texis -version)? You may need to explicitly drop it in older Windows versions, ie.:

texis -d /database/mydb "drop table vortex"
texis -d /database/mydb -W

State table variables

Posted: Fri Oct 07, 2005 3:56 pm
by webinatoruser
You're hosting it I guess on a linux box.

Texis Web Script (Vortex) Copyright (c) 1996-2003 Thunderstone - EPI, Inc.
Commercial Version 4.03.1063225259 of Sep 10, 2003 (i686-unknown-linux2.4.9-64-3
2)

I'm working on Ron Hogan's stuff. The first option didn't give me an error, but I still am not getting my variables back if I specify TABLE, only URL works for me. I really need this to work as I am passing sometimes large values in anchor tags and I can't rely on name value pairs in urls as they might get truncated.

State table variables

Posted: Mon Oct 10, 2005 3:13 pm
by mark
I performed the 2 commands suggested above and it works now.

State table variables

Posted: Wed Oct 12, 2005 6:03 pm
by webinatoruser
Hi Mark

Yes that works now, but it never worked for me. Could it be a permissions thing?

I set another variable as a state table variable today in the script and I have the same problem. I tried to issue those same commands again and it still doesn't get registered. Sorry a bit frustrated!