Solved

Server.Timeout change not working

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

23 Experts available now in Live!

Get 1:1 Help Now