Commodore640
Programmer
- Aug 30, 2011
- 14
Hi everyone!
I got a really strange error and I have no clue how to fix it, so any advice would be a lifesaver.
I have created a system where users need to log in. I got complaints that it kicks them out too early. I extended the session length as much as I could but that still was not enough. so I figured if I put encrypted passwords into more permanent cookies like this:
Response.Cookies("passw") = "jambalaya"
Then if they got kicked out, I can just read the encrypted password and id from their computer and relogin them back. I guess this is something like Facebook use as well.
Here is what happens. If I wait long enough (a bunch of hours) and refresh the screen that can be visible only when you are logged in I got the following error:
ODBC Drivers error '80040e14'
it happens in the line where I want to launch a search for the user using their id and pass that I just read out from the cookie.
All variables have the information that is needed.
The weirdest thing when I try to print the query onto the screen it is cut right after the first variable.
strQuery = "SELECT * FROM adminstaff WHERE passw='" & passw & "' AND userid='" & userid & "' AND Aktiv=1;"
Response.Write strQuery & "iamhere"
Set objRS = objConn.Execute(strQuery)
This is what I see on the screen when I print the quesry before it launches:
SELECT * FROM adminstaff WHERE passw='jambalaya
ODBC Drivers error '80040e14'
Even though I put a & "iamhere" after printing of the line, it seems to ignore whatever is after, it cuts itself in half...
However my code is complete and in normal mode, when I relogin again and no timeout on the sessions, everything works fine, no error message...
Any ideas what this could be? Maybe if the user looses its session, a different process is needed to build it up or?
I got a really strange error and I have no clue how to fix it, so any advice would be a lifesaver.
I have created a system where users need to log in. I got complaints that it kicks them out too early. I extended the session length as much as I could but that still was not enough. so I figured if I put encrypted passwords into more permanent cookies like this:
Response.Cookies("passw") = "jambalaya"
Then if they got kicked out, I can just read the encrypted password and id from their computer and relogin them back. I guess this is something like Facebook use as well.
Here is what happens. If I wait long enough (a bunch of hours) and refresh the screen that can be visible only when you are logged in I got the following error:
ODBC Drivers error '80040e14'
it happens in the line where I want to launch a search for the user using their id and pass that I just read out from the cookie.
All variables have the information that is needed.
The weirdest thing when I try to print the query onto the screen it is cut right after the first variable.
strQuery = "SELECT * FROM adminstaff WHERE passw='" & passw & "' AND userid='" & userid & "' AND Aktiv=1;"
Response.Write strQuery & "iamhere"
Set objRS = objConn.Execute(strQuery)
This is what I see on the screen when I print the quesry before it launches:
SELECT * FROM adminstaff WHERE passw='jambalaya
ODBC Drivers error '80040e14'
Even though I put a & "iamhere" after printing of the line, it seems to ignore whatever is after, it cuts itself in half...
However my code is complete and in normal mode, when I relogin again and no timeout on the sessions, everything works fine, no error message...
Any ideas what this could be? Maybe if the user looses its session, a different process is needed to build it up or?