473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout expired

41 New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTimeout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
Aug 15 '07 #1
4 22394
ilearneditonline
130 Recognized Expert New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTimeout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
The problem is that the connection to the SQL server is timing out, not the script. You need to define a timeout on your command or maybe your connection.

Expand|Select|Wrap|Line Numbers
  1. Dim conn
  2. Set conn = Server.CreateObject("ADODB.Connection")
  3. conn.ConnectionString = "Your ConnectionString"
  4. conn.ConnectionTimeout = 120 'number of seconds
Or if you are using a command object

Expand|Select|Wrap|Line Numbers
  1. Dim cmd
  2. Set cmd = Server.CreateObject("ADODB.Command")
  3. cmd.CommandTimeout = 120 ' number of seconds
Aug 15 '07 #2
CalBob
2 New Member
My ASP page is calling a Stored Procedure,it will take around 70 to 100 seconds to execute.I am getting timeout error in my ASP page.

I already put
Server.ScriptTimeout = 3600

Microsoft OLE DB Provider for SQL Server (0x80040E31)
Timeout expired

Please Advice....

Thanks
In calling your stored procedure set the CommandTimeout = (and the number of seconds you need such as 120)
Aug 17 '07 #3
jhardman
3,406 Recognized Expert Specialist
Although I have on occasion timed out on long procedures (emailing in particular) I am much more likely to time out when a loop isn't advancing. I have noticed that this happens in even fairly well-formed code when an error causes the loop to not advance but I have included an error handler which keeps the script executing. I don't know if this will help...

Jared
Aug 17 '07 #4
ilearneditonline
130 Recognized Expert New Member
In calling your stored procedure set the CommandTimeout = (and the number of seconds you need such as 120)
server.scripttimeout has no effect on the stored procedure. that is how long before a script on the page times out. If you have a stored procedure you know takes 70-100 seconds to timeout, you need to make sure that your command object to the database doesn't timeout before the sp can finish.
Aug 18 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1763
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. -----------------------------------------------------------...
5
13256
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use...
2
4560
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
4
4897
by: Nick | last post by:
Hi I am a little stuck. I have a web app which uses cookieless session management. I would like to inform a user when their session has ended but cannot work out how to implement. I thought...
3
13957
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection...
4
13156
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
0
2020
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to...
1
45148
by: Ron | last post by:
Hi, I had a stored procedure on SQL 2000 server to run calculation with large amount of data. When I called this stored procedure via System.Data.SqlClient.SqlCommand on production, i got error...
3
2225
by: rn5a | last post by:
I am working on Win2K Pro (SP4) with P4 2.80GHz, 256MB RAM & 20GB hard disk (IIS5.0). I use Visual Web Developer 2005 Express Edition to create & edit ASP.NET apps. Whenever I log in to my m/c....
1
5143
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.