session var type mismatch

Results 1 to 3 of 3

Thread: session var type mismatch

  1. #1
    Adrian Guest

    Default session var type mismatch

    I am storing an integer as a session variable. Early in the code I put:<BR>session("myvar") = 51<BR>Later when I come to change this number(add an integer variable) it errors out with a type mismatch- I tried doing my sum in seperate variable(function worked) and converting the result with CStr(), for example<BR>session("myvar") = CStr(aggvariable)<BR><BR>Still type mismatch...? how can I tell it I want to store just numbers? I check the session variable with vartype() and it is recorded as a string.....<BR>pls help<BR>thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: session var type mismatch

    cInt(var) or cLng(var)

  3. #3
    Join Date
    Dec 1969

    Default RE: session var type mismatch

    You need to make sure it knows you are storing a number by doing...<BR><BR>session("myvar") = CINT("variable")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts