Salve a tutti,
mi è comparso questo errore:
non riesco a capirne il perchè visto che è la prima volta che me lo indica...ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/public/area_riservata/Blog/include/calendario.asp, line 91
Mi potete aiutare? Grazie.
Posto il codice interessato
codice:<% Function NameFromMonth(iMonth) select case cint(iMonth) case 1 s = "Gennaio" case 2 s = "Febbraio" case 3 s = "Marzo" case 4 s = "Aprile" case 5 s = "Maggio" case 6 s = "Giugno" case 7 s = "Luglio" case 8 s = "Agosto" case 9 s = "Settembre" case 10 s = "Ottobre" case 11 s = "Novembre" case 12 s = "Dicembre" end select NameFromMonth = s End Function Function LastDay(testYear, testMonth) LastDay = Day(DateSerial(testYear, testMonth + 1, 0)) End Function Function GetPrevMonth(iThisMonth,iThisYear) GetPrevMonth=month(dateserial(iThisYear,iThisMonth,1)-1) End Function Function GetPrevMonthYear(iThisMonth,iThisYear) GetPrevMonthYear=Year(dateserial(iThisYear,iThisMonth,1)-1) End Function Function GetNextMonth(iThisMonth,iThisYear) GetNextMonth=month(dateserial(iThisYear,iThisMonth+1,1)) End Function Function GetNextMonthYear(iThisMonth,iThisYear) GetNextMonthYear=year(dateserial(iThisYear,iThisMonth+1,1)) End Function Sub DisplaysmallCalendar(sMonth, iYear) Response.write ("<table border='0' CELLPADDING=2 CELLSPACING=0 align='center' width='130'><tr><td height=""16"" align='right' width='33%'>") Response.Write ("[img]../immagini/frecciasx.gif[/img][img]../immagini/frecciasx.gif[/img]</td><td align='center' width='34%'><font class='green'>") Response.Write ( Ucase(sMonth) & "" & iYear & "</font></td><td width='33%'>" ) Response.Write ("[img]../immagini/freccia.gif[/img][img]../immagini/freccia.gif[/img]</td></tr></table>") Response.write ("<table border='0' CELLPADDING=2 CELLSPACING=0 align='center' width='130'><tr align='center'><td>L</td>") Response.write ("<td>M</td>") Response.write ("<td>M</td>") Response.write ("<td>G</td>") Response.write ("<td>V</td>") Response.write ("<td>S</td>") Response.write ("<td>D</td></tr>") Response.write ("<tr><td colspan=""7""><div class='hrgreen'>[img]../immagini/spacer.gif[/img]</div></td></tr>") i = 0 dDay = DateSerial(iYear,iMonth,1) iMonth = Month(dDay) iYear = Year(dDay) iLastDay = LastDay(iYear, iMonth) iFirstDay= Weekday(dDay) iLastDay = iFirstDay + iLastDay -1 do while i<= iLastDay if i <> iLastDay then Response.Write ("<tr>") else exit do end if for j=1 to 7 if (j < iFirstDay and i = 0) or (i + j > iLastDay) then Response.Write ("<td valign='top'></td>") else k = k + 1 sDate = "#" & iMonth & "/" & k & "/" & iYear & "#" Set rs_calendario = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT blog.* FROM blog WHERE data = " & sDate rs_calendario.Open strSQL, adoCon if rs_calendario.eof then if (k = Day(now)) and (iMonth = Month(now)) and (iYear = Year(now)) then sEvent = "<div class='giornocorrente'>" & k & " </div>" else sEvent = k end if else if (k = Day(now)) and (iMonth = Month(now)) and (iYear = Year(now)) then sEvent = "<div class='back'><A HREF = '../../../arc_blog.asp?giorno=" & k & "&month=" & iMonth & "&year=" & iYear & "' title='visualizza blog' target='_top'>" & k & "</A></div>" else sEvent = "<div class='back2'><A HREF = '../../../arc_blog.asp?giorno=" & k & "&month=" & iMonth & "&year=" & iYear & "' title='visualizza blog' target='_top'>" & k & "</A></div>" end if End If Response.Write ("<td valign='top' align='center'>") Response.write sEvent Response.Write ("</td>") end if next i=i+7 loop Response.Write ("</tr>") if rs_calendario.state <> 0 then rs_calendario.close set rs_calendario = nothing Response.Write ("</table> ") end sub %>

Rispondi quotando
