I have used the MSExcel ODBC driver with ADO to connect to our canteen menu (a .xls file) and convert it to HTML (via ASP) and display it on our Intranet - works like a charm.<BR><BR>A user asked if I could put another spreadsheet on the Intranet for them. "No problem" I said, figuring I could re-use the code.<BR><BR>Well, I did (with obvious changes) but now, randomly I get the following error.<BR><BR>Provider error &#039 80004005&#039 <BR><BR>Unspecified error <BR><BR>/shuts.asp, line 57 <BR><BR>If I turn off system error detection with On Error Resume Next and usemy more detailed error display I get...<BR><BR>State Before Open : adStateClosed<BR>Error Num: -2147467259 - Description: Unspecified error - Source: Provider - SQLState: - NativeError: -2147467259<BR>State After Open : adStateClosed<BR><BR>Usually the first attempt to view the page is OK (not always though, this error happens on first view sometimes). Normally subsequent views fail (but again, it&#039s erratic - not always).<BR><BR>Once it fails, I have to wait a while (minutes usually) and it will usually come back (for one display) and then fail when I click on refresh!<BR><BR>Here&#039s the code (Sorry, I&#039m not the best coder!), line 57 (the error point) has been highlighted.<BR><BR>The DSN was configured with the Read-Only box ticked. I also can&#039t understand why if someone is editing the file in Excel I get a similar error (if the ASP is run at the same time)- surely if Read-Only I should be able toview it at least?<BR><BR>Can anyone please help - this is driving me MAD!<BR><BR>P.S. If it&#039s working reliably I can usually force the error by viewing the .xls in Excel and then coming out of Excel - then running the .asp file.<BR><BR>&#060;% OPTION EXPLICIT %&#062;<BR>&#060;HTML&#062;<BR>&#060;HEAD&#062;<BR >&#060;meta HTTP-EQUIV="Expires" CONTENT="0"&#062;<BR> &#060;TITLE&#062;Planned Shut Timetable&#060;/TITLE&#062;<BR>&#060;STYLE TYPE="text/css"&#062;<BR>TABLE TR { color : black ;<BR>font-size : 7pt ;<BR>font-family : Tahoma, Arial<BR>}<BR>.ourlinks { color : blue;<BR>font-size : 12pt;<BR>font-family : Tahoma, Arial;<BR>}<BR>A { text-decoration : none<BR>}<BR>.heading { color : black;<BR>font-size : 12pt;<BR>font-family : Tahoma, Arial;<BR>font-weight : bold<BR>}<BR><BR>A:hover { color : red} <BR>A:link { color : blue}<BR>&#060;/STYLE&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;DIV ALIGN="CENTER"&#062;<BR>&#060;!-- #include file="banner.inc" --&#062;<BR>&#060;/DIV&#062;<BR>&#060;%<BR>Public rst, conn, DEBUG, Error, strSQL, item, sConn, i<BR><BR>Const adLockReadOnly = 1<BR>Const adLockPessimistic = 2<BR>Const adLockOptimistic = 3<BR>Const adLockBatchOptimistic = 4<BR>Const adModeRead = 1<BR>Const adStateOpen = 1<BR>Const adStateClosed = 0<BR><BR>DEBUG = Request.Querystring("DEBUG")<BR><BR>On Error Resume Next<BR><BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>Set rst = Server.CreateObject("ADODB.Recordset")<BR><BR>strS QL = "SELECT * FROM [1999 Shuts$]"<BR><BR>conn.Mode = adModeRead<BR>conn.ConnectionTimeout = 0<BR>sConn = "Data Source=WebShutPlan" <BR><BR>conn.errors.clear<BR>Response.Write "State Before Open : " & GetState(conn.State) & "<BR>"<BR><BR>&#039THE FOLLOWING LINE CAUSES THE ERROR!!<BR>conn.open sConn<BR><BR>for each item in conn.errors<BR> Response.Write "Error Num: " & item.Number & " - Description: " & item.Description & " - Source: " & item.Source & " - SQLState: " & item.SQLState & " - NativeError: " & item.NativeError & "<BR>"<BR>next<BR><BR>Response.Write "State After Open : " & GetState(conn.State) & "<BR>"<BR>&#039sConn="DSN=WebShutPlan;DBQ=C:DATAIN ETPUBWWWROOTPLANMAIN.XLS;DefaultDir=C:DATAINETPUBW WWROOT;DriverId=790;FIL=excel 8.0;MaxBufferSize=2048;PageTimeout=5;"<BR><BR>If (DEBUG="ON") then Response.Write strSQL<BR><BR>rst.open strSQL, conn, 0, adLockReadOnly, 1<BR><BR>If Err.Number &#060;&#062; 0 then<BR><BR> If (DEBUG="ON") then<BR> PrintError("<BR>Open Recordset")<BR> End If<BR><BR> Response.Write "&#060;TABLE align=""center"" valign=""center"" Width=""760"" CellPadding=""6"" CellSpacing=""1"" Border=1&#062;"<BR> Response.Write "&#060;TR&#062;&#060;TD BGColor=""#000000"" align=""center"" valign=""center""&#062;&#060;FONT COLOR=""#FFFF00""FACE=""Tahoma"" SIZE=""+3""&#062;"<BR> Response.Write "The Menu is Currently Being Updated.<BR>Please Come Back in a Few Minutes"<BR> Response.Write "&#060;/FONT&#062;&#060;/TD&#062;&#060;/TR&#062;&#060;/TABLE&#062;"<BR><BR> If (IsObject(rst)) then<BR> <BR> If (GetState(rst.State)="adStateOpen") then<BR> rst.Close<BR> End If<BR> <BR> set rst = Nothing<BR> <BR> End If<BR> <BR> If (IsObject(conn)) then<BR> <BR> If (GetState(conn.State)="adStateOpen") then<BR> conn.Close<BR> End If<BR> <BR> set conn= Nothing<BR> <BR> End If<BR><BR>Else<BR><BR> rst.MoveFirst<BR><BR> If (DEBUG="ON") then<BR> Response.Write "Record " & rst.AbsolutePosition & " of " & rst.RecordCount & "<BR>"<BR> End If<BR><BR> Response.Write "&#060;TABLE WIDTH=760 align=""center"" CellPadding=""2"" CellSpacing=""2"" Border=1&#062;"<BR><BR> Response.Write "&#060;TR&#062;&#060;TD NOWRAP Class=""heading"" ColSpan=8 align=""Center"" valign=""Top"" BGColor=""0080FF""&#062;"<BR> Response.Write "Planned Shut Timetable"<BR> response.Write "&#060;/TD&#062;&#060;/TR&#062;"<BR> Response.Write "&#060;TR CLASS=""heading"" STYLE=""{ font-size : 8pt ; text-align : CENTER}""&#062;"<BR> Response.Write "&#060;TD WIDTH=60&#062;Date&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=60&#062;Day&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=60&#062;M/C Shut&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=116&#062;PM13&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=116&#062;PM14&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=116&#062;Winders&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=116&#062;FPP&#060;/TD&#062;"<BR> Response.Write "&#060;TD WIDTH=116&#062;Utilities&#060;/TD&#062;"<BR> Response.Write "&#060;/TR&#062;"<BR> rst.MoveNext<BR><BR> While (Not rst.EOF And Not rst.BOF)<BR> i = 1<BR> Response.Write "&#060;TR&#062;"<BR> For each item in rst.Fields<BR> If (i &#060;= 3) then<BR> Response.Write "&#060;TD ALIGN=""CENTER"" WIDTH=60 valign=""Top"" BGCOLOR ""#FFFFFF""&#062;" & item.Value & "&nbsp;&#060;/TD&#062;"<BR> Else<BR> Response.Write "&#060;TD ALIGN=""CENTER"" WIDTH=116 valign=""Top"" BGCOLOR ""#FFFFFF""&#062;" & item.Value & "&nbsp;&#060;/TD&#062;"<BR> End If<BR> i = i + 1<BR> Next<BR><BR> Response.Write "&#060;/TR&#062;"<BR><BR> rst.MoveNext<BR><BR> Wend<BR><BR> Response.Write "&#060;/TABLE&#062;"<BR><BR>End If<BR><BR>Sub PrintError(ExtraInfo)<BR> Response.Write ExtraInfo & ": " & Err.Number & " - " & Err.Description<BR>End Sub<BR><BR>Function GetState(intState)<BR><BR>Select Case intState<BR> Case adStateClosed<BR> GetState = "adStateClosed"<BR> Case adStateOpen<BR> GetState = "adStateOpen"<BR> End Select<BR><BR>End Function<BR><BR>%&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR>