Nei risultatio del motore di ricerca non ho trovato soluzione o non riesco a captare le varie soluzioni esistenti.

Io ho questo codice che non mi funziona bene:

codice:
<%
      set conn = server.createobject("ADODB.Connection")
      Conn.Open  "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("percorso database")
      sql = "SELECT * from tabella where campo1 = 'esempio' ORDER by campo2" 
      Set Rs = Server.CreateObject("ADODB.Recordset")
      Rs.Open sql, Conn, 1, 3

              RecordsPerPage = 5
              Page = Request.QueryString("page")
            If Len(page) > 0 And IsNumeric(page) Then
              page = CLng(page)
            Else
              Page = 1
            End If
            
            
            If Rs.EOF Then
              Response.Write "


<center>Non ci sono record</center>"
            Else
              Rs.PageSize = RecordsPerPage
              Rs.AbsolutePage = Page

             
              For x = 1 To RecordsPerPage
              
           If not rs.eof then 
%>
<table cellspacing="0" cellpadding="0" style="color:#ff6600; font-size:12px; font-family:verdana, arial">
<% 
Const MyNumCols = 2
ActualCol = -1
%>
<tr>
<%
while not rs.eof
   ActualCol = ActualCol  + 1
   if ActualCol = MyNumCols then
       ActualCol = 0
%>
</tr>
<tr><td height="20"></td></tr>
<tr>
<%
   end if
%> 
   <td width="250" height="30" align="center">

<%If rs("campo3")= "nessuno" Then%>

<table border="1" bordercolor="#ECD70C" cellpadding="0" cellspacing="0" width="100%" height="110"  style="color:#ff6600; font-size:12px; font-family:verdana, arial">
 <tr>
  <td align="center" wisth="140">
  <a href="<%=rs("campo4")%>" target="_new">
  <%=rs("campo1")%></a>
  </td>
  <td align="center" width="90">
  [img]img/box.jpg[/img]
  </td>
 </tr>
</table>

<%else%>

<table border="1" bordercolor="#ECD70C" cellpadding="0" cellspacing="0" width="100%" height="110" style="color:#ff6600; font-size:12px; font-family:verdana, arial">
 <tr>
  <td align="center" width="140">
  <a href="<%=rs("campo4")%>" target="_new">
  <%=rs("campo1")%></a>
  

  <%If rs("campo3")= "prova" Then%>
  di
  <%else%>
  assegnato a
  <%End If%>
  

  <%=rs("campo3")%>
  </td>
  <td align="center" width="90">
  [img]img/box.jpg[/img]
  </td>
 </tr>
</table>

<%End If%>

   </td>
<td width="20"></td>
<%
   rs.movenext 
wend 
%>
</tr>
        </table>
<%
        End If
           Next
           End If

%>



<center>
Pagina:[
<%
              For i = 1 To Rs.PageCount
            If i = page Then
              Response.Write "-"& i &""
            Else
              Response.Write ("-" & i & "")
            End If
              Next

            
              Rs.Close
              Set Rs = Nothing
              Conn.Close
              Set Conn = Nothing

%>
]
</center>
Non so cosa ho sbagliato in questo codice.
Grazie dell'aiuto.