Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Server.Timeout change not working

Posted on 2002-05-24
5
Medium Priority
?
203 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 400 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

730 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