
setting session variables with dynamic identifiers?
hi,
I want to set several session variables in global.asa,
on_sessionStart, where I get both name and value from a database.
I was think along these lines:
ipnr = Request.ServerVariables("REMOTE_HOST")
SQL = "SELECT grupp FROM personal " & _
"WHERE ipnr = " & ipnr
Set grupp = conn.execute(SQL)
SQL = "SELECT * FROM case_prefs " & _
"WHERE gruppID = '"& grupp(0) &"'"
Set prefs = conn.execute(SQL)
session(grupp(0)) = true
While not prefs.EOF
for i = 1 to prefs.fields.count - 1
if len(trim(prefs(i))) > 0 then
session(prefs.fields(i).name) = prefs(i)
end if
next
prefs.moveNext
Wend
Problem is apparantly you can't do:
session(variable) = "frmp"
Is there another easy way, that actually works;), of looping out
variables both name and value from a table.
grateful for any input!
regards,
/Martin