Jag har ett probelm, jag får det här felmeddelandet, vad är det som är fel och hur rättar jag till det?:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/bild2/bilder.asp, line 86
Här är koden:
<%Response.Buffer = "True"%>
<!--#Include file="settings.asp"-->
<html>
<head>
<script language="JavaScript">
<!--
function blured()
{
for (a in document.links) document.links[a].onfocus = document.links[a].blur;
}
if (document.all)
{
document.onmousedown = blured;
}
// -->
</script>
<link rel="stylesheet" href="stil.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style></head>
<body>
<%Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db%>
<table width="400" align="center" border="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td height="10" colspan="2"> </td>
</tr>
<form name="menyn">
<tr>
<td width="267"> </td>
<td align="right" width="133">
<!--#Include file="meny.asp"-->
</td>
</tr>
</form>
<tr>
<td height="10" colspan="2"> </td>
</tr>
</table>
<table width="400" border="0" align="center" cellpadding="3">
<%Set RecSet=Conn.Execute("Select * From galleri Where sort='" & Request.Querystring("kat") & "' Order By namn")
If RecSet.EOF Then%>
<tr>
<td>Inga användare inlagda i kategorin <%=Request.Querystring("kat")%>!</td>
</tr>
<%Else
Do Until RecSet.EOF
Set RS=Conn.Execute("Select * From galleri Where namn='" & RecSet("namn") & "'")
Set ReS=Conn.Execute("Select Top 1 * From bilder Where namn='" & RecSet("namn") & "' Order By datum desc")
Set Bilder=Conn.Execute("Select Count(*) As antal From bilder Where namn='" & RecSet("namn") & "'")
If ReS.EOF Then%>
<tr>
<td width="100" valign="top" nowrap class="normal">
<img src="pics/tom.gif" width="90" border="1">
</td>
</tr>
<tr>
<td colspan="3" height="10"> </td>
</tr>
<%Else%>
<tr>
<td width="100" valign="top" nowrap class="normal">
<a href="visa.asp?id=<%=RecSet("namn")%>"><img src="pics/<%=ReS("Bild")%>" width="90" border="1"></a>
</td>
<td valign="top" class="normal" width="295"> <font size="2"><b><a href="visa.asp?id=<%=RecSet("namn")%>"><%=RecSet("namn")%></a></b> </font><br>
<%If Len(RS("bildinfo")) > 60 Then%>
<%= Left(Replace(RS("bildinfo"), vbCrLf, "<br>" ),60)%>..
<%Else%>
<%=Replace(RS("bildinfo"), vbCrLf, "<br>" )%>
<%End If%> </td>
</tr>
<tr>
<tr>
<td colspan="3" height="10"> </td>
</tr>
<%End If
RecSet.MoveNext
Loop
End If%>
</table>
</body>
</html>