• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Timeout expired (breakup pages)

Error I am getting:

Microsoft OLE DB Provider for SQL Server error '80004005'
Timeout expired
/z1/table3.asp, line 54

Ok I am looking for code to break-up pages to it does not time-out.

Current Code is:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=SQLOLEDB; Data Source=localhost; Initial Catalog=001; User ID=xxxxx; Password=xxxxxx"
Set ObjRs = Server.CreateObject("ADODB.Recordset")

'DECLARATIONS
dim dia, strID, strSQL, Conn, rs, strSQL2, strSQL3, strSQL4, strSQL5, rs2, rs3, rs4, rs5, ordno
dia = Date()
strSQL = "SELECT * FROM sfordfil_sql WHERE compl_dt is NULL ORDER BY ord_no"
set rs = Conn.Execute(strSQL)
%>
<table border="1" width="546" id="table1" height="63">
     <tr>
          <td height="31" width="109">Shop Order #</td>
          <td height="31" width="102">Short Model #</td>
          <td height="31" width="102">Item Description</td>
          <td height="31" width="102">Start Date</td>
          <td height="31" width="72">Print</td>
     </tr>
<% While Not rs.EOF %>
     <tr>
          <td width="109"><%= rs("ord_no") %></td>
          <td width="102"><%= rs("item_no") %></td>
          <td width="102"><%= rs("item_desc_1") %></td>
          <td width="102"><%= rs("start_dt") %></td>
            <td width="72">
<%
     strSQL2 = "SELECT * FROM labels WHERE sf_ord = " & rs("ord_no")
     set rs2 = Conn.Execute(strSQL2)
if rs2.BOF AND rs2.EOF then%>
<a href="printme.asp?ordno=<%= rs("ord_no") %>">Print First</a>
<%Else%>
<a href="printme.asp?ordno=<%= rs("ord_no") %>">Print again</a>
<%End If%>
</font></td>
</tr>
<% rs.MoveNext %>
<% Wend %>
</table>
<%
conn.close
set conn = nothing
%>
0
kwitcom
Asked:
kwitcom
  • 3
  • 3
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
It sounds like a Timeout retrieving the data from SQL Server rather than a problem with the page.
0
 
kwitcomAuthor Commented:
What if It is trying to look at too many records?
0
 
Carl TawnSystems and Integration DeveloperCommented:
Possibly, or a network issue. Do you have any idea how many records it should be returning ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kwitcomAuthor Commented:
maybe 100 or so out of maybe 10K.
0
 
Carl TawnSystems and Integration DeveloperCommented:
That should be ok. The error message definatley indicates a problem retrieving the data from the SQL Server.

Can you retrieve data from other tables or other pages ? Do you have access to the SQL Server/Enterprise Manager so you can test the query directly against the DB ?
0
 
kwitcomAuthor Commented:
yes..... I will try that.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now