Timeout expired

Results 1 to 2 of 2

Thread: Timeout expired

  1. #1
    Join Date
    Dec 1969

    Default Timeout expired

    1)Open connection with<BR>...<BR>conn.connectionTimeout =15<BR>conn.commandTimeout =30<BR>..<BR>set rs = cm.execute<BR>2)loop through couple thousand records<BR> while not rs.eof<BR> call function<BR> function<BR> conn.connectionTimeout =15<BR> conn.commandTimeout =30<BR> query, blah, blah<BR> conn.close<BR> end function<BR> rs.movenext<BR> wend<BR>I keep getting Timeout expired. What should or can I do to prevent this? I have a couple of thousand items to loop through.<BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Timeout expired

    Hi,<BR><BR>Try this<BR><BR>1) Instead of running the query from the asp page, write it in a stored procedure and then call the stored procedure.<BR><BR>2) Also before calling the procedure, save the server.scripttimeout in a variable, set the scripttimeout to 900 and after that, reset the scripttimeout to original<BR><BR>Dim a<BR>a=server.scripttimeout<BR>server.scripttimeou t=900<BR><BR>&#039;Call the procedure<BR><BR>server.scripttimeout=a<BR><BR>Tha t&#039;s it<BR><BR>Nilesh Deshpande<BR><BR>www.usajobs.com<BR>www.indiacar.c om

Posting Permissions

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