|
Hi all,
I have been looking and playing around with this code trying to figure out why I get this error.
Here is the code that is causing the problem:
'Set the destination URL ''********************************************************** ************** DestURL = rs("DestURL")
Response.Cookies(strCookieName)("GPAUsername") = rs("GPAUsername") Response.Cookies(strCookieName)("FirstName") = rs("FirstName") Response.Cookies(strCookieName)("LastName") = rs("LastName") Response.Cookies(strCookieName)("Email") = rs("Email") Response.Cookies(strCookieName)("Account1") = rs("Account1") Response.Cookies(strCookieName)("Account2") = rs("Account2") Response.Cookies(strCookieName)("Account3") = rs("Account3") Response.Cookies(strCookieName)("UserGood") = "Yes" Response.Cookies(strCookieName)("Admin") = rs("Admin") Response.Cookies(strCookieName)("Location") = rs("Location") Response.Cookies(strCookieName)("Valid") = rs("Valid") Response.Cookies(strCookieName)("Suspended") = rs("Suspended") Response.Cookies(strCookieName).Domain = " http://www.gpagallery.com - www.gpagallery.com " Response.Cookies(strCookieName).Expires = strExpireDate Session("UserMessages") = rs("UserMessages")
rs.Close Set rs = Nothing conn.Close Set conn = Nothing
Response.Redirect DestURL
Else
'Set the destination URL ''********************************************************** ************** DestURL = rs("DestURL")
Session("GPAUsername") = rs("GPAUsername") Session("FirstName") = rs("FirstName") Session("LastName") = rs("LastName") Session("Email") = rs("Email") Session("Account1") = rs("Account1") Session("Account2") = rs("Account2") Session("Account3") = rs("Account3") Session("UserGood") = "Yes" Session("Admin") = rs("Admin") Session("Location") = rs("Location") Session("UserMessages") = rs("UserMessages") Session("Valid") = rs("Valid") Session("AutoLoginReminder") = "Yes" Session("Suspended") = rs("Suspended")
rs.Close Set rs = Nothing conn.Close Set conn = Nothing
Response.Redirect DestURL
The code works fine when you use the session variables but when you use the cookies I get this error
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[object]'
/login_checkuser.asp, line 163
line 163 is Response.Cookies(strCookieName)("Account1") = rs("Account1")
The Account1 field is setup just like the first name field.(a text field) I'm using an access 2000 database running on a win 2000 server.
This error happens when I leave this field blank. When I populate it I get the error on the Account2 line. I tried leaving another field blank like location or first name and I have no problems. I'm scratching my head trying to figure out what is going on. Any help would be appreciated.
|