Ho applicato questo tipo di codice per la paginazione... ma la pagina mi restituisce il seguente errore!!
_____________
Provider error '80020005'
Type mismatch.
/rubriche/include-fotoBuffe/ricerca_dati_fotoBuffe.asp, line 26
__________________________
Il codice è il seguente:
<%
perpage=4
%>
<%
Dim page
page = "1"
If (Request.QueryString("varfotobuffa") <> "") Then
page = Request.QueryString("varfotobuffa")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
strRicerca = Request("QueryFotoBuffe")
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_fotoBuffeconnekt_STRING
Recordset1.Source = "SELECT * FROM QueryFotoBuffe WHERE Categoria = '" + Replace(page, "'", "''") + "' ORDER BY IDFotobuffa DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<% recordset1.pagesize = perpage
recordset1.Absolutepage = page
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 4
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"><img src="../../images/index/struttura_categoria/menu_sopra_big.gif" width="10" height="20"></td>
<td width="98%" bgcolor="#2B70FF"><div align="center"><span class="sei_in_categoria_sms">SEi in foto buffe NELLA CATEGORIA
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<%=(Recordset1.Fields.Item("Categoria").Value)%>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</span></div></td>
<td width="1%"><img src="../../images/index/struttura_categoria/menu_sopra_big_dx.gif" width="10" height="20"></td>
</tr>
<tr valign="top">
<td height="248" colspan="3"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabella_lista_categoria">
<tr>
<td height="248" valign="top"> <div align="center" class="link-spost">
<table width="100%" height="247" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="100%" height="247" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" class="link-spost"><hr width="300" size="1" color="#0000FF">
<table width="100%" border="0">
<% sorte=0 %>
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<% if sorte = 0 or sorte = 2 then %>
<tr>
<td width="40%">
<div align="right">
<a href="<%=(Recordset1.Fields.Item("fotobuffa").Value)%>" target="_blank"> <img src="<%=(Recordset1.Fields.Item("fotobuffa").Value)%>" width="120" height="120" border="0" > </a>
</div></td>
<% End if %>
<% if sorte = 1 or sorte = 3 then %>
<td width="30"> </td>
<td width="40%">
<div align="left">
<a href="<%=(Recordset1.Fields.Item("fotobuffa").Value)%>" target="_blank"> <img src="<%=(Recordset1.Fields.Item("fotobuffa").Value)%>" width="120" height="120" border="0" > </a>
</div></td>
</tr>
<% End if %>
<% sorte = sorte+1 %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</table></td>
</tr>
</table></td>
</tr>
</table>
<hr width="300" size="1" color="#0000FF">
<br>
<%
For pag= 1 to recordset1.PageCount
if page = pag then
'grassetto per la pagina corrente
Response.Write "<b>"
Response.Write "<A href='fotobuffe.asp?page=" & pag
Response.write "'>"
Response.Write pag
Response.Write "</A> "
Response.Write "</b>"
else
'normale per le altre pagine
Response.Write "<A href='fotobuffe.asp?page=" & pag
Response.write "'>"
Response.Write pag
Response.Write "</A> "
end if
Next
%>
</div></td>
</tr>
</table> </td>
</tr>
<tr>
<td><img src="../../images/index/struttura_categoria/menu_sotto_big_sx.gif" width="10" height="20"></td>
<td bgcolor="#2B70FF"> </td>
<td><img src="../../images/index/struttura_categoria/menu_sotto_big_dx.gif" width="10" height="20"></td>
</tr>
</table>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>