set DB with variable?

johnk+thunderstone
Posts: 3
Joined: Fri Oct 10, 2008 1:47 pm

set DB with variable?

Post by johnk+thunderstone »

Is it possible to set the DB directive using a variable or does it have to be a string? If it is possible, what is the correct syntax?

per
http://www.thunderstone.com/site/vortexman/db.html
the syntax is
<DB = "path">

Attempting something like this does not seem to work:
<DB = $somevariable>
nor this
<DB = "$somevariable">
User avatar
John
Site Admin
Posts: 2625
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

set DB with variable?

Post by John »

The correct syntax is the first one you had, without quotes:

<db=$somevariable>

Have you checked the contents of the variable?
John Turnbull
Thunderstone Software
johnk+thunderstone
Posts: 3
Joined: Fri Oct 10, 2008 1:47 pm

set DB with variable?

Post by johnk+thunderstone »

I haven't checked the variable contents explicitly.
My testing method was to replace this:

<DB = "/example/path/to/db">

with this:

<$myvar = "/example/path/to/db">
<DB = $myvar>
User avatar
John
Site Admin
Posts: 2625
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

set DB with variable?

Post by John »

That should work if executed within Vortex code. It wouldn't work as a directive at the top of the file.
John Turnbull
Thunderstone Software
johnk+thunderstone
Posts: 3
Joined: Fri Oct 10, 2008 1:47 pm

set DB with variable?

Post by johnk+thunderstone »

Whether or not the directive at the top of the file could be set with a variable instead of "hard-coded" is the answer I was seeking. Thank you for the confirmation!