Solved

Server.Timeout change not working

Posted on 2002-05-24
5
190 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now