Vortex - err if DB not initialized

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Vortex - err if DB not initialized

Post by Thunderstone »



Hello,

I was trying to initialize some variables, assign them some values, etc.
before initializing/connecting to the DB.
The problem is that certain types of assignment cause errors like this one:

<!-- 002 /test:4: can't open /usr/web/ij/servers/ndx/html/db/SYSLOCKS:
Permission denied in the function getshared -->
<!-- 000 /test:4: Could not open locking mechanism in the function
ddopen -->
<!-- 004 /test:4: Could not create database
/usr/web/ij/servers/ndx/html/db -->

The line that causes the problem is the one starting with <$abc ... below:

<SCRIPT LANGUAGE="Vortex">
<A NAME=main PUBLIC>
<$tmpldir = '/tmp'>
<$abc = ($tmpldir + '/abs.html')>
</A>
</SCRIPT>

Is there anything I can do to make Vortex allow me to do this?
The line above doesn't cause problems, so I'm not sure why the $abc one
does...

Is there any way around this? Alternatives?

Thanks,

Otis



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Vortex - err if DB not initialized

Post by Thunderstone »




Using math in Vortex assignment statements (ones with parens around the
right side) requires an open database handle, thus the error in this
case. The previous assignment <$tmpldir = '/tmp'> does not use math
and therefore did not need to open a database.


Make sure the topmost <DB> directive (above all functions) is pointing
to a database that always exists, so that a valid database can be
opened for math even before <DB> is set in the function.

Or use <sum> instead of + in assignments where the database is not open
or valid yet; this does not require a db handle.

-Kai


Post Reply