I have the following page
and when I try to go to it, I receive the error 80040e31, I've reviewed several web pages pertaining to this and they all seem to talk about the connection string as being something that can cause this issue. Can someone please take a look at my connection string and see if this is what may be causing my issue with this page?
Thank you,
Doug
Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" /> <title>Time Data</title> </head> <body> <% Set oConn = Server.CreateObject("ADODB.Connection") oConn.ConnectionTimeout = 120 oConn.Open "Provider=SQLOLEDB; Server=xxxxx; Database=MDR; Uid=xxxxx; Pwd=xxxxx" Dim rs Set rs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT TOP 1 AVG(Zero) FROM mCallEnd WHERE (CallKind=0 OR CallKind=1 OR CallKind=16) AND Zero>0 AND OrgAccount=5127066669 AND Timestamp >= DATEDIFF(n, '12-31-1899', DATEADD(dd, DATEDIFF(dd,0,getdate()), 0))" Set rs = oConn.execute(SQL) do while NOT rs.EOF if rs.recordcount = 0 then Response.Write "No records returned" else Dim Zero_Sec Zero_Sec = rs("Zero") Response.Write "Average “Zero” field since midnight: " & Zero_Sec %><br /> <% rs.MoveNext end if Loop rs.Close Set rs = Nothing oConn.Close Set oConn = Nothing Set oConn2 = Server.CreateObject("ADODB.Connection") oConn2.Open "Provider=SQLOLEDB; Server=xxxxxx; Database=MDR; Uid=xxxxx Pwd=xxxxx3" Dim rs2 Set rs2 = Server.CreateObject("ADODB.Recordset") SQL2 = "SELECT TOP 1 Zero FROM mCallEnd WHERE (CallKind=0 OR CallKind=1 OR CallKind=16) AND OrgAccount=5127066669 ORDER BY Timestamp DESC" Set rs2 = oConn2.execute(SQL2) do while NOT rs2.EOF if rs2.recordcount = 0 then Response.Write "No records returned" else Zero = rs2("Zero") Response.Write "The actual Zero amount for the last account entry is: " & Zero %><br /> <% rs2.MoveNext end if Loop rs2.Close Set rs2 = Nothing oConn2.Close Set oConn2 = Nothing %>
Thank you,
Doug
Comment