setting session variables with dynamic identifiers? 
Author Message
 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



Sat, 10 May 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Create a dynamic array from set of Session variables

2. dotnet Session variable set too late - Error Page Description related

3. VB Unique Identifier for WWW session

4. Setting Dynamic Variables

5. browser window size, set to a session variable?

6. Setting ASP Session variable

7. Setting a session variable from a href

8. Getting/Setting Session Variables from JavaScript

9. Can an onClick set a session variable?

10. Setting Session variable to List SelectedIndex

11. Request for Help: setting session variables using javascript.

12. browser window size, set to a session variable?

 

 
Powered by phpBB® Forum Software