In pratica è uno script di paginazione che utilizzavo con ms access ma ora che sono passato a mysql ho questo errore:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.
/elenco_articoli.asp, line 163

Ecco lo script completo:
codice:
<%

Record_Pagina = 3

Numerazione_Max = 8

Pag = CInt(Request.Querystring("pag"))

scategoria = Request.querystring("cat")
if scategoria="tutte" then scategoria = "%"

sql = "select * from (SELECT * from foto WHERE categoria = '"& scategoria &"' AND attiva = 'SI' UNION ALL SELECT * from video WHERE categoria = '"& scategoria &"' AND attiva = 'SI') order by data desc " 

Set Rec = Server.CreateObject ("ADODB.Recordset")
Rec.PageSize = Record_Pagina
Rec.Open sql, Conn, 3, 3

if rec.eof then
%>
<p align="center"><font face="tahoma" size="4">
Non ci sono notizie di:</font><br><b><u><font face="tahoma" color="#0909B9"size="5"><%=request.querystring("cat")%></u></b>
</font></p>
<%
else
end if

If (Not Rec.Eof) Then
  If Pag>Rec.PageCount Then
    Pag = Rec.PageCount
  End If
  If Pag = 0 Then
    Pag = 1
  End If

  Rec.AbsolutePage = Pag

indice_inizio = pag-(Numerazione_Max/2)
  If (indice_inizio>(Rec.PageCount-Numerazione_Max)) Then
    indice_inizio = Rec.PageCount-Numerazione_Max+1
  End If
  If (indice_inizio<=0) Then
    indice_inizio = 1
  End if
  indice_fine=indice_inizio+Numerazione_Max-1
  If (indice_fine>Rec.PageCount) Then
    indice_fine = Rec.PageCount
  End If
%>

<%
  Link = "<p align=""center""><font face=""tahoma"" size=""2""><a href=""?pag=1&cat=" & scategoria & """>< </a>"
  
  If (indice_inizio<>1) Then
    Link=Link&"<a href=""?pag="&(indice_inizio-1)&"&cat=" & scategoria & """>Indietro "
  End If
  For i=indice_inizio to indice_fine

  If (i=pag) then
    Link = Link&"<b>["&i&"]</b> "
  'Link alle altre pagine
  Else
    Link = Link&"<a href=""?pag="&i&"&cat=" & scategoria & """>"&i&" "
  End If
  Next


  If (indice_fine<Rec.PageCount-1) Then
    Link = Link&"<a href=""?pag="&(indice_fine+1)&"&cat=" & scategoria & """>Avanti "
  End If


  Link=Link&"<a href=""?pag="&Rec.PageCount&"&cat=" & scategoria & """> >  </font></p>"
End If

i=0
While (NOT rec.EOF)and(i<Record_Pagina)
  i = i+1
%>
RISULTATI
<%
rec.MoveNext
WEnd
Response.Write(Link)
rec.close
%>
La linea incriminata è:
codice:
 sql = "select * from (SELECT * from foto WHERE categoria = '"& scategoria &"' AND attiva = 'SI' UNION ALL SELECT * from video WHERE categoria = '"& scategoria &"' AND attiva = 'SI') order by data desc " 

Come posso fare?
Grazie per l'aiuto.
G.