Solved

Server.Timeout change not working

Posted on 2002-05-24
5
201 Views
Last Modified: 2011-10-03
I've written a SQL 2000 stored procedure that goes into my database, checks to see whether or not indexes exist for my data, and if not, continues on and adds them.

However, I have about 650,000 records that need to be processed, holding up the script for a long time.

I've tried to use Server.Timeout to change the setting, but unfortunately that doesn't seem to be working.


My code is as follows:

<% option explicit
Response.Buffer = TRUE
Server.ScriptTimeout = 3600
'response.write Server.ScriptTimeout

b = c.Execute(index)  'index = "Execute sp_...."

%>

The error I keep getting is:

Microsoft OLE DB Provider for SQL Server error '80040e31'

Timeout expired

/web/list.asp, line 81


Line 81 is the Execute Line.


Any thoughts would be greatly appreciated.


-JS


0
Comment
Question by:jsolo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:jsolo
ID: 7032009
Forgot to mention that the timeout occurs after the default time, about 90 seconds.
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 100 total points
ID: 7032057
You have to change the Connection.Timeout and Command.Timeout values of the Connection Object and not the Server.Timeout property alone.

What you are experiencing is an ADO Problem and not an ASP problem.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7032061
secondly, you shouldn't really be using ASP for this kind of work. It wasn't designed for this.

Checking 650,000 rows with ASP is terrible. Write A VB Programme, or better still a C# or VB.NET programme dedicated to do this.
0
 

Author Comment

by:jsolo
ID: 7032114
Thanks for the help.  Could you elaborate more on the other possibilies?  

The project I'm working must be on the web, so how could I change what I'm doing to speed up the process?

Thanks again.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7032130
You are better off doing this:
1. Have a web page that accepts administrative commands,
submitting this to the database as a single record per action.

2. Inside Microsoft SQL Server, create a scheduled task that checks on specified intervals for the particular value. Based on the field being say 1 (a bit type field), it fires off the action based on the fieldname. After the work is done, reset the bit to 0.

This is best performed solely inside Microsoft SQL Server and not via ASP.

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Recordset containing single quotes 8 51
Connection to multiple databases 13 45
Making Table Thru ASP Response.write 5 37
VB script help 23 50
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question