J
Jim in Arizona
I'm doing a query on a webproxy log, which is a pretty large table. I'm only
doing a query on a single days worth, but could be upwards of 250000
records. Originally I got a timeout error saying to increase the time using
Server.ScriptTimeout so I put Server.ScriptTimeout = "900" at the top of my
script. This didn't seem to help. Now I got this error:
a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Timeout expired
/suntest.asp, line 39
This time it didn't mention what type of timeout I'm experiencing, at least,
not that I can see. I've seen the ASPFAQ on timeouts
(http://www.aspfaq.com/show.asp?id=2066) but that didn't help me even when I
tried pretty much all of them (on another test a few months back). I'm using
IIS 5. The database I'm using is SQL server 2K. Here's my code.
<%@ Language=VBScript %>
<%
Server.ScriptTimeout = "900"
Dim Conn, sql, daterange, RS
daterange = Request.Form("daterange")
sql = "SELECT * FROM [webproxylog]"
sql = sql & " WHERE (logdate=convert(datetime," & "'" & daterange & "'" &
",102))"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL
Server};Server=sunspark;Database=ISALogs;Uid=sa;Pwd=slinky;"
Set RS1 = Conn.Execute(sql)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Testing</title>
</head>
<body>
<%
If RS1.EOF and RS1.BOF Then
Response.Write("<nobr>There Are No Records</nobr>")
Else
Response.Write("<nobr><h3><u>WebProxyLog Query</u></h3></nobr>")
Response.Write("<table border=""1"" align=""center"" bordercolor=""maroon""
cellspacing=""0"" cellpadding=""7"" width=""95%"">")
Response.Write("<tr><td width=""5%""><h3>Test Column</h3></td></tr>")
RS1.MoveFirst
While Not RS1.EOF
Response.Write("<tr><td> ")
Response.Write(RS1.Fields("ClientUserName") & "</td></tr>")
RS1.MoveNext
Wend
Response.Write("</table>")
End If
%>
</body>
</html>
Thanks.
Jim
doing a query on a single days worth, but could be upwards of 250000
records. Originally I got a timeout error saying to increase the time using
Server.ScriptTimeout so I put Server.ScriptTimeout = "900" at the top of my
script. This didn't seem to help. Now I got this error:
a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Timeout expired
/suntest.asp, line 39
This time it didn't mention what type of timeout I'm experiencing, at least,
not that I can see. I've seen the ASPFAQ on timeouts
(http://www.aspfaq.com/show.asp?id=2066) but that didn't help me even when I
tried pretty much all of them (on another test a few months back). I'm using
IIS 5. The database I'm using is SQL server 2K. Here's my code.
<%@ Language=VBScript %>
<%
Server.ScriptTimeout = "900"
Dim Conn, sql, daterange, RS
daterange = Request.Form("daterange")
sql = "SELECT * FROM [webproxylog]"
sql = sql & " WHERE (logdate=convert(datetime," & "'" & daterange & "'" &
",102))"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL
Server};Server=sunspark;Database=ISALogs;Uid=sa;Pwd=slinky;"
Set RS1 = Conn.Execute(sql)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Testing</title>
</head>
<body>
<%
If RS1.EOF and RS1.BOF Then
Response.Write("<nobr>There Are No Records</nobr>")
Else
Response.Write("<nobr><h3><u>WebProxyLog Query</u></h3></nobr>")
Response.Write("<table border=""1"" align=""center"" bordercolor=""maroon""
cellspacing=""0"" cellpadding=""7"" width=""95%"">")
Response.Write("<tr><td width=""5%""><h3>Test Column</h3></td></tr>")
RS1.MoveFirst
While Not RS1.EOF
Response.Write("<tr><td> ")
Response.Write(RS1.Fields("ClientUserName") & "</td></tr>")
RS1.MoveNext
Wend
Response.Write("</table>")
End If
%>
</body>
</html>
Thanks.
Jim