• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

MisMatch error Using Session

I am trying to use session vars to pass the info from an input form ( dumping into SQL DB ) to the resulting 'Thank You' page.

I have used this as an example of getting input vars from my Sign-up page:
LastName=request.Form("LastName")
I add it with the
SQLStmt syntax and dump it into the Db...No Problem

-----Problem Starts------
<% Session("LastName")="VarLastName" %>

It throws this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Session'
...Line 497

----Problem-------------

I then use a Response.Redirect "Thank_You.ASP"
and I want to pull the info thru to personalize the page

I've tried this at the top, middle, bottom of the page and can't get it to work.  This error occurs on page load and stops all activity.  I can't get the SUBMIT to work,
Any help appreciated.  


Thanks,

Brad
0
sms_toad
Asked:
sms_toad
1 Solution
 
henrywwCommented:
have u posted the msg in the wrong area?
... hmmm not sure.
never happen to me b4,
looks like u may have a session timeout
how often does it happen?
u don't have to user session to get the form post even after u insert into dB, u can still use request.from (that if ur insert script and thankyou page in one asp file)

type put these in ur code, to set the timeout to 60min
<% sessionTimeout = 60 %>

hope it helps
cheers
0
 
elhyCommented:
1). Just curious, why do u want to store the value "VarLastName" to Session("LastName") since your already have the value for request.form("LastName")? I mean why not session("LastName") = request.form("LastName")

2). You may want to post all your code or at least more than what u have above so that we can debug further. Coz the problem might be from other lines and slowly leads to that line.

0
 
sms_toadAuthor Commented:
Thank you for your answers.  

It turns out that the mistake was on my part.  I was trying to POST and GET the data & I posted my question to the wrong area.

Sorry,

Brad
0
 
henrywwCommented:
that's ok :)
0
 
Computer101Commented:
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now