By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,322 Members | 1,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,322 IT Pros & Developers. It's quick & easy.

Session Timeout when trying to read database

P: n/a
hi all,
can you please tell me what i should do to avoid session timeout when
displaying my database info in my asp form
(DisplayUserDatabase.asp)???
** actualy it does load and display the database randomly....otherwise
it's always runs into a session time out....
**Also when i save new account info (You'll notice that i've been
asked to put a save button near each record...so, it's not one global
save it's by record), i'd like to be able to save only the changed
record and nothing else. The way i do it now works, but i've to reload
to whole page and get the same timeout error!!! is there anyway to
change this??? After saving my DB info i redirect the user to the
former form (DisplayUserDatabase.asp). Maybe it's because i'm using 2
forms: one for displaying DB info(DisplayUserDatabase.asp) and another
one for saving new info(SaveUserAccount.asp)...but otherwise i don't
see how i can make this work without my 2 forms???

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
and in my updateUserAccount.asp, after the update call i just redirect
the user to the main form like this:

Response.Redirect "DisplayUserDatabase.asp"
Thanks Guys!
Jul 19 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Could you find a different way to explain your problem(s)? I don't see how
your code below relates to sessions timing out.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
hi all,
can you please tell me what i should do to avoid session timeout when
displaying my database info in my asp form
(DisplayUserDatabase.asp)???
** actualy it does load and display the database randomly....otherwise
it's always runs into a session time out....
**Also when i save new account info (You'll notice that i've been
asked to put a save button near each record...so, it's not one global
save it's by record), i'd like to be able to save only the changed
record and nothing else. The way i do it now works, but i've to reload
to whole page and get the same timeout error!!! is there anyway to
change this??? After saving my DB info i redirect the user to the
former form (DisplayUserDatabase.asp). Maybe it's because i'm using 2
forms: one for displaying DB info(DisplayUserDatabase.asp) and another
one for saving new info(SaveUserAccount.asp)...but otherwise i don't
see how i can make this work without my 2 forms???

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
and in my updateUserAccount.asp, after the update call i just redirect
the user to the main form like this:

Response.Redirect "DisplayUserDatabase.asp"
Thanks Guys!

Jul 19 '05 #2

P: n/a
"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
hi all,
can you please tell me what i should do to avoid session timeout when
displaying my database info in my asp form
(DisplayUserDatabase.asp)???
** actualy it does load and display the database randomly....otherwise
it's always runs into a session time out....
**Also when i save new account info (You'll notice that i've been
asked to put a save button near each record...so, it's not one global
save it's by record), i'd like to be able to save only the changed
record and nothing else. The way i do it now works, but i've to reload
to whole page and get the same timeout error!!! is there anyway to
change this??? After saving my DB info i redirect the user to the
former form (DisplayUserDatabase.asp). Maybe it's because i'm using 2
forms: one for displaying DB info(DisplayUserDatabase.asp) and another
one for saving new info(SaveUserAccount.asp)...but otherwise i don't
see how i can make this work without my 2 forms???

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
and in my updateUserAccount.asp, after the update call i just redirect
the user to the main form like this:

Response.Redirect "DisplayUserDatabase.asp"
Thanks Guys!

Sometimes processing takes more than the default 20 seconds; try :

<% Server.ScriptTimeout = 3600 %>

3600 seconds = 60 minutes
Jul 19 '05 #3

P: n/a
That is insane. Would anyone really sit there waiting for an hour for a
page to finish loading? IE times out after five minutes, by default, for
one thing.

Ray at work

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VEdhb.527794$Oz4.399437@rwcrnsc54...

Sometimes processing takes more than the default 20 seconds; try :

<% Server.ScriptTimeout = 3600 %>

3600 seconds = 60 minutes

Jul 19 '05 #4

P: n/a
well it's not realy what i meant...sorry for that...just saw it...i
was trying to set my session timeout to a different time. so sorry....
So...my problem is this one: when i try to load my database, it takes
forever and sometimes just times out coz' it's too long. This happens
when i load display the database for the 1st time and all the time
after a save. I do save one record at time but always redirect the
user to the main page. That's why i'd like to be able to save the
record that has been changed and load/display changes without
reloading my whole database...
I know it's my submit button and then the response.redirect but i
don't know how to do this differently and keep my configuration as it
is....

Also, i read somewhere that acces is not designed for Internet use,
although it
can be used on the Internet via ODBC. However, it is not fast, and
its'
capacity for users is also highly limited. With a lot of records,
performance is going to be slowed.

Unfortunately i don't realy have a choice, i've to stick with it for a
while!

Any help will be realy appreciated....
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<eh**************@TK2MSFTNGP12.phx.gbl>...
Could you find a different way to explain your problem(s)? I don't see how
your code below relates to sessions timing out.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
hi all,
can you please tell me what i should do to avoid session timeout when
displaying my database info in my asp form
(DisplayUserDatabase.asp)???
** actualy it does load and display the database randomly....otherwise
it's always runs into a session time out....
**Also when i save new account info (You'll notice that i've been
asked to put a save button near each record...so, it's not one global
save it's by record), i'd like to be able to save only the changed
record and nothing else. The way i do it now works, but i've to reload
to whole page and get the same timeout error!!! is there anyway to
change this??? After saving my DB info i redirect the user to the
former form (DisplayUserDatabase.asp). Maybe it's because i'm using 2
forms: one for displaying DB info(DisplayUserDatabase.asp) and another
one for saving new info(SaveUserAccount.asp)...but otherwise i don't
see how i can make this work without my 2 forms???

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
and in my updateUserAccount.asp, after the update call i just redirect
the user to the main form like this:

Response.Redirect "DisplayUserDatabase.asp"
Thanks Guys!

Jul 19 '05 #5

P: n/a
I agree with you Ray...i'll never put something like that for a script
timeout! they'll kill me!!!!...is it because i,m using access with
internet or what???
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<e9**************@tk2msftngp13.phx.gbl>...
That is insane. Would anyone really sit there waiting for an hour for a
page to finish loading? IE times out after five minutes, by default, for
one thing.

Ray at work

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VEdhb.527794$Oz4.399437@rwcrnsc54...

Sometimes processing takes more than the default 20 seconds; try :

<% Server.ScriptTimeout = 3600 %>

3600 seconds = 60 minutes

Jul 19 '05 #6

P: n/a
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:e9**************@tk2msftngp13.phx.gbl...
That is insane. Would anyone really sit there waiting for an hour for a
page to finish loading? IE times out after five minutes, by default, for
one thing.

Ray at work

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VEdhb.527794$Oz4.399437@rwcrnsc54...

Sometimes processing takes more than the default 20 seconds; try :

<% Server.ScriptTimeout = 3600 %>

3600 seconds = 60 minutes


My client must be insane then.

I use it in a database-driven, browser-based application that runs daily to
process many thousands of records.

The "page" is not for public consumption.

BTW, the application doesn't take an hour but it does take more than ten
minutes.

P.S. 3600 seconds was just an example of how to use ScriptTimeout.
Jul 19 '05 #7

P: n/a
I guess it depends on the size of your recordset, the speed of your server,
and lots of other things.

But quite often, it's because of an endless loop somewhere.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
I agree with you Ray...i'll never put something like that for a script
timeout! they'll kill me!!!!...is it because i,m using access with
internet or what???
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<e9**************@tk2msftngp13.phx.gbl>...
That is insane. Would anyone really sit there waiting for an hour for a
page to finish loading? IE times out after five minutes, by default, for one thing.

Ray at work

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VEdhb.527794$Oz4.399437@rwcrnsc54...

Sometimes processing takes more than the default 20 seconds; try :

<% Server.ScriptTimeout = 3600 %>

3600 seconds = 60 minutes

Jul 19 '05 #8

P: n/a
Well...once again i do agree with you...but i did indeed checked all
those things before i post my problem....lets say even if it does not
time out then it takes realy long time to load and that, i don't realy
understand??? i realy did check everything and still don't understand
why a simple page will take all that time for simple action as
"save"...

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<Oj**************@TK2MSFTNGP09.phx.gbl>...
I guess it depends on the size of your recordset, the speed of your server,
and lots of other things.

But quite often, it's because of an endless loop somewhere.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
I agree with you Ray...i'll never put something like that for a script
timeout! they'll kill me!!!!...is it because i,m using access with
internet or what???
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<e9**************@tk2msftngp13.phx.gbl>...
That is insane. Would anyone really sit there waiting for an hour for a
page to finish loading? IE times out after five minutes, by default, for one thing.

Ray at work

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:VEdhb.527794$Oz4.399437@rwcrnsc54...
>
> Sometimes processing takes more than the default 20 seconds; try :
>
> <% Server.ScriptTimeout = 3600 %>
>
> 3600 seconds = 60 minutes
>
>

Jul 19 '05 #9

P: n/a
Are you sure you don't have an infinite loop somewhere (missing rs.movenext
for instance)?
Can you show your code?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
Well...once again i do agree with you...but i did indeed checked all
those things before i post my problem....lets say even if it does not
time out then it takes realy long time to load and that, i don't realy
understand??? i realy did check everything and still don't understand
why a simple page will take all that time for simple action as
"save"...

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<Oj**************@TK2MSFTNGP09.phx.gbl>...
I guess it depends on the size of your recordset, the speed of your server, and lots of other things.

But quite often, it's because of an endless loop somewhere.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
I agree with you Ray...i'll never put something like that for a script
timeout! they'll kill me!!!!...is it because i,m using access with
internet or what???
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:<e9**************@tk2msftngp13.phx.gbl>...
> That is insane. Would anyone really sit there waiting for an hour
for a > page to finish loading? IE times out after five minutes, by

default, for
> one thing.
>
> Ray at work
>
> "McKirahan" <Ne**@McKirahan.com> wrote in message
> news:VEdhb.527794$Oz4.399437@rwcrnsc54...
> >
> > Sometimes processing takes more than the default 20 seconds; try :
> >
> > <% Server.ScriptTimeout = 3600 %>
> >
> > 3600 seconds = 60 minutes
> >
> >

Jul 19 '05 #10

P: n/a
Hi Mark,
well...i did post my code. but here's it again....thansk for your help...

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
"Mark Schupp" <ms*****@ielearning.com> wrote in message news:<u8**************@TK2MSFTNGP09.phx.gbl>...
Are you sure you don't have an infinite loop somewhere (missing rs.movenext
for instance)?
Can you show your code?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
Well...once again i do agree with you...but i did indeed checked all
those things before i post my problem....lets say even if it does not
time out then it takes realy long time to load and that, i don't realy
understand??? i realy did check everything and still don't understand
why a simple page will take all that time for simple action as
"save"...

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<Oj**************@TK2MSFTNGP09.phx.gbl>...
I guess it depends on the size of your recordset, the speed of your server, and lots of other things.

But quite often, it's because of an endless loop somewhere.

Ray at work

"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
> I agree with you Ray...i'll never put something like that for a script
> timeout! they'll kill me!!!!...is it because i,m using access with
> internet or what???
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:<e9**************@tk2msftngp13.phx.gbl>... > > That is insane. Would anyone really sit there waiting for an hour for a > > page to finish loading? IE times out after five minutes, by default,
for > > one thing.
> >
> > Ray at work
> >
> > "McKirahan" <Ne**@McKirahan.com> wrote in message
> > news:VEdhb.527794$Oz4.399437@rwcrnsc54...
> > >
> > > Sometimes processing takes more than the default 20 seconds; try :
> > >
> > > <% Server.ScriptTimeout = 3600 %>
> > >
> > > 3600 seconds = 60 minutes
> > >
> > >

Jul 19 '05 #11

P: n/a
Try removing the <table> tags and just do a simple write of a single column
in the loop (followed by response.flush). If that runs quickly then
gradually build up the HTML code one step at a time to see where the delay
is.

Do While Not objDisplayRS.EOF
Response.Write objDisplayRS("ID") & "<br>" & vbCrLf
objDisplayRS.MoveNext
Loop

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
Hi Mark,
well...i did post my code. but here's it again....thansk for your help...

Heres' my code:

<form Method="Post" name="DisplayUserDatabase">

<%
Do While Not objDisplayRS.EOF
Response.Write "<form name=""SaveUserAccount"" method=""Post"">"
'----Retreive the information and displays it in a table
Response.Write("<TR VALIGN=""TOP"">")
Response.Write ("<TD><input type = ""text"" name = ""IDUser""
size=""3""value = """ & objDisplayRS("ID") & """>")
Response.Write(" <TD><input type=""text"" name=""NewName""
size=""20""value=""" &objDisplayRS("UserName") &""">")
Response.Write(" <TD><input type=""text"" name=""NewPswd""
size=""20""value=""" &objDisplayRS("Pswd") &""">")
Response.Write("<BR></TD>")

'Action to perform update or delete account

Response.Write(" <TD><input type=""submit""value="" Save""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=UpdateAccount'; "">")
Response.Write(" <TD><input type=""submit""value="" Delete""
onClick= ""this.form.action='
SaveUserAccount.asp?ActionToDo=DeleteAccount'; "">")
Response.Write("</TR>")

Response.Write "</form>"
objDisplayRS.MoveNext
Loop

Response.Write "</TABLE>" & vbCrLf
End If

' Close DB objects and free variables
objDisplayRS.Close
Set objDisplayRS = Nothing
"Mark Schupp" <ms*****@ielearning.com> wrote in message

news:<u8**************@TK2MSFTNGP09.phx.gbl>...
Are you sure you don't have an infinite loop somewhere (missing rs.movenext for instance)?
Can you show your code?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"HolaGoogle" <ho*****@yahoo.com> wrote in message
news:cd**************************@posting.google.c om...
Well...once again i do agree with you...but i did indeed checked all
those things before i post my problem....lets say even if it does not
time out then it takes realy long time to load and that, i don't realy
understand??? i realy did check everything and still don't understand
why a simple page will take all that time for simple action as
"save"...

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:<Oj**************@TK2MSFTNGP09.phx.gbl>...
> I guess it depends on the size of your recordset, the speed of your

server,
> and lots of other things.
>
> But quite often, it's because of an endless loop somewhere.
>
> Ray at work
>
> "HolaGoogle" <ho*****@yahoo.com> wrote in message
> news:cd**************************@posting.google.c om...
> > I agree with you Ray...i'll never put something like that for a
script > > timeout! they'll kill me!!!!...is it because i,m using access with
> > internet or what???
> > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in

message
news:<e9**************@tk2msftngp13.phx.gbl>...
> > > That is insane. Would anyone really sit there waiting for an hour for a
> > > page to finish loading? IE times out after five minutes, by

default,
for
> > > one thing.
> > >
> > > Ray at work
> > >
> > > "McKirahan" <Ne**@McKirahan.com> wrote in message
> > > news:VEdhb.527794$Oz4.399437@rwcrnsc54...
> > > >
> > > > Sometimes processing takes more than the default 20 seconds;

try : > > > >
> > > > <% Server.ScriptTimeout = 3600 %>
> > > >
> > > > 3600 seconds = 60 minutes
> > > >
> > > >

Jul 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.