<% num=request("num") search=request("search") %> <% dbg=0 dbpath=server.MapPath("../../../database/amministrativo.it") dbname="\finanziaria2007.mdb" path=dbpath & dbname if dbg=1 then response.write num if left(num,1)=">" then md= ">" ord="order by comma" num=mid(num,2) elseif left(num,1)="<" then md= "<" num=mid(num,2) ord="order by comma desc" else md= "=" ord="" end if if isnumeric(num)=true then else num="" end if if num<>"" then sSQL = "SELECT top 1 comma, testo FROM tabella WHERE comma "&md&" "&num&" "&ord if dbg=1 then response.write ssql Set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& path rs.open sSql, conn, 3,1 If rs.EOF=true Then response.write "
Nessun documento individuato con i parametri forniti. Ampliare la ricerca

" Else num=rs(0) testo=replace(rs(1),"


"+vbcrlf+"
","

") mtitolo=lefT(testo,90) if search<>"" then testo=replace(testo,search,""&search&"",1, -1, vbTextCompare) art=replace(art,search,""&search&"",1, -1, vbTextCompare) end if response.write "Articolo precedente - "&num&""">Articolo successivo - Indice

"& testo&"

" end if rs.Close set rs = Nothing conn.Close set conn = Nothing end if %>