Class not registered
Hej alleI dag stoppede min kalender med at fungere og den kom med følgende uforståelse fejl:
Provider error '80040154'
Class not registered
/kalender/admin_oversigt.asp, line 123
Jeg prøvede at udskrive sql'en, som er, men der er ingen problemer der:
SELECT * FROM KALENDER_EVENTS ORDER BY Date
Jeg prøvede også at køre sql'en manuel og det gik også fint.
Jeg har ikke ændret noget på scriptet i måske et år nu, men jeg har dog løbende ændret ting på serveren, dog virker sql-serveren fint.
Hvad kan fejlen være?
Koden er følgende og der fejles på den sidste linie:
<%
orderBy = request.querystring("orderby")
SearchWhere = request("SearchWhere")
SearchFor = request("SearchFor")
If (SearchWhere = "All") Then
SQL_SearchWhere = "(Event_Name LIKE ('%" & SearchFor & "%') OR Date LIKE ('%" & SearchFor & "%') OR Location LIKE ('%" & SearchFor & "%') OR Category LIKE ('%" & SearchFor & "%'))"
Else
SQL_SearchWhere = SearchWhere & " LIKE ('%" & SearchFor & "%')"
End If
If NOT (SearchFor = "") Then
SQL_SearchFor = " WHERE " & SQL_SearchWhere
Else
SQL_SearchFor = ""
End If
If orderBy = "Event_Name_Up" Then
SQL_OrderBy = " ORDER BY Event_Name DESC"
ElseIf orderBy = "Event_Name_Down" Then
SQL_OrderBy = " ORDER BY Event_Name"
ElseIf orderBy = "Date_Up" Then
SQL_OrderBy = " ORDER BY Date DESC"
ElseIf orderBy = "Date_Down" Then
SQL_OrderBy = " ORDER BY Date"
ElseIf orderBy = "Location_Up" Then
SQL_OrderBy = " ORDER BY Location DESC"
ElseIf orderBy = "Location_Down" Then
SQL_OrderBy = " ORDER BY Location"
ElseIf orderBy = "Category_Up" Then
SQL_OrderBy = " ORDER BY Category DESC"
ElseIf orderBy = "Category_Down" Then
SQL_OrderBy = " ORDER BY Category"
Else
orderBy = "Date_Down"
SQL_OrderBy = " ORDER BY Date"
End If
if mlev = 4 then
SQL = "SELECT * FROM KALENDER_EVENTS " & SQL_SearchFor & SQL_OrderBy
else
SQL = "SELECT * FROM KALENDER_EVENTS where author = " & MemberID & " " & SQL_SearchFor & SQL_OrderBy
end if
%>
<form action="admin_oversigt.asp" Method="GET">
<table border="0" cellpadding="2" cellspacing="0" align="center">
<tr>
<td><font face="<%=strDefaultFontFace%>" size="<%=strDefaultFontSize%>" color="<%=strForumFontColor%>"><b>Søg efter</b></font></td>
<td>
<input type="text" name="SearchFor" class="inputBox" value="<%=SearchFor%>" size="20"></td>
<td><font face="Verdana, arial" size="1" color="48576C"><b>i</b></font></td>
<td><select name="SearchWhere" class="inputBox">
<option value="All" <%If (SearchWhere = "All") Then%>SELECTED<%End If%>>Alle felter</option>
<option value="Event_Name" <%If (SearchWhere = "Email") Then%>SELECTED<%End If%>>Titel</option>
<option value="Date" <%If (SearchWhere = "Name_Last") Then%>SELECTED<%End If%>>Dato</option>
<option value="Location" <%If (SearchWhere = "Date_In") Then%>SELECTED<%End If%>>Landsdel</option>
<option value="Location" <%If (SearchWhere = "Date_In") Then%>SELECTED<%End If%>>Type</option>
</select></td>
<td><input type="submit" value="Ok" class="inputSubmit"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
Set RS = Server.CreateObject("ADODB.Recordset")
dim intPage
dim intPageCount
dim intRecordCount
If Request.QueryString("page") = "" Then
intPage = 1
Else
intPage = Request.QueryString("page")
End If
RS.CursorLocation = 3
RS.CursorType = 3
RS.ActiveConnection = DataConn
response.write SQL
RS.Open SQL, DataConn, 1, 3