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

x
?
Solved

Timeout expired

Posted on 2003-11-10
3
Medium Priority
?
1,446 Views
Last Modified: 2010-04-06
All,

I am running a Stored Procedure from a Web Page and I continually get the following error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E31)
[Microsoft][ODBC SQL Server Driver]Timeout expired
/OMSEDD/inc/vbsubs.inc, line 7

VBsubs.inc - Creates My recordset.
------------------------------------------------------------------------
<%
Sub LoadRecordSet(rstRecordset, strSQLStatement)
      SET cmdSP = CreateObject("ADODB.Command")
      cmdSP.CommandText = strSQLStatement
      cmdSP.ActiveConnection = cnnGlobalConnection
      SET rstRecordset= CreateObject("ADODB.Recordset")
      SET rstRecordset= cmdSP.Execute
End Sub
%>
---------------------------------------------------------------------------
Connection  - Creates My connection object.
------------------------------------------------------------------------
<%
Sub OpenConnection
      Set cnnGlobalConnection = Server.CreateObject("ADODB.Connection")
      cnnGlobalConnection.ConnectionString = "driver={SQL Server};server=SNORSQLTEST02;uid=webaccess;pwd=webconnect;database=OMSEDD"
      cnnGlobalConnection.CommandTimeout = 0
      cnnGlobalConnection.ConnectionTimeout = 0
      cnnGlobalConnection.Open
      End Sub
%>
-----------------------------------------------------------------------------

Can anyone explain to me why I am getting a timeout and how I can fix it?

Thanks
0
Comment
Question by:Uugeman
[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
3 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 100 total points
ID: 9716352
try putting this line on the top of the page:

<% Server.ScriptTimeout = 480 %>
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9716363
in case the problem is not your asp script, try optimizing your sql query by adding WHERE clause and make sure your table has a primary key
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9716386
also you can try modifying the following keys in the registry:

HKLM/p2pLog/p2pLog/1.0/dbaccess/CommandTimeout
HKLM/p2pLog/p2pLog/1.0/dbaccess/ConnectionTimeout

the above are set to 300 by default
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

660 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