Session help!

Results 1 to 2 of 2

Thread: Session help!

  1. #1
    Join Date
    Dec 1969

    Default Session help!

    An intrinsic object cannot be stored within the Session object<BR><BR>I get this error each time I want to set a sessio, here is my code :<BR><BR>et RS = Server.CreateObject("ADODB.Recordset")<BR>Query = "select count(*) as num from users where username = &#039;" & request("username") & "&#039; and password = &#039;" & request(password) & "&#039;"<BR>RS.Open Query,Connect,3,3<BR><BR>If RS("num") &#060;&#062; "0" Then<BR> Set Session("UserName") = Request("UserName")<BR>Response.Redirect "view_post.asp"<BR>else<BR>Response.Write "Wrong password and/or Username"<BR>end if<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Session help!

    The &#039;SET&#039; command is to be used only with objects, and you are trying to put a string in the session object.<BR>So use this:<BR><BR>Session("UserName") = Request("UserName")

Posting Permissions

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