mi dite qual'è il problema?
io non riesco a capire...
Errore di run-time di Microsoft VBScript error '800a01f5'
Assegnazione non valida: 'I'
/admin/elenco.asp, riga 160
codice:<% iPageSize = 20 'NUMERO RECORD PER PAGINA If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If Set conn = Server.CreateObject("ADODB.Connection") conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("/mdb-database/dbab.mdb") sql = "select id, nome from negozio order by nome;" set rs = Server.CreateObject("ADODB.Recordset") rs.PageSize = iPageSize rs.CacheSize = iPageSize rs.Open sql, conn, adOpenStatic, adLockReadOnly, adCmdText reccount = rs.recordcount iPageCount = rs.PageCount If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 If iPageCount = 0 Then Response.Write "<p class=""Stile1"">Nessun elemento</p>" Else rs.AbsolutePage = iPageCurrent iRecordsShown = 0 cont=1 response.Write("<table border=""0"" width=""80%"">") response.Write("<tr>") response.Write("<td width=""25%"">Nome</td>") response.Write("<td width=""25%"">Modifica</td>") response.Write("<td width=""25%"">Elimina</td>") response.Write("<td width=""25%"">Assegna Categoria</td>") response.Write("</tr>") Do While iRecordsShown < iPageSize And Not rs.EOF Dim Rig, bg Rig = Rig + 1 nomenegozio = rs("nome") idnegozio = rs("id") response.Write("<tr>") response.Write("<td width=""25%"">"&nomenegozio&"</td>") response.Write("<td width=""25%"">Modifica</td>") response.Write("<td width=""25%"">Elimina</td>") response.Write("<td width=""25%"">Assegna Categoria</td>") response.Write("</tr>") Cont = Cont + 1 'POSIZIONAMENTO ALLA RIGA SUCCESSIVA DEL DB iRecordsShown = iRecordsShown + 1 rs.MoveNext Loop response.Write("</table>") 'PULIZIA DEGLI OGGETTI ADO rs.Close Set rs = Nothing End if If iPageCount <> 1 Then '>>>>>>>>>>>>>>>>>>>>>>> %> <p class="Stile1">[ <%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%> [img]images/first.gif[/img] <%end if%> <%if iPageCurrent > 1 then%> [img]images/pre.gif[/img] <%end if%> <%if iPageCount > 2 then if iPageCurrent-2 < 1 then da_pag = 1 else da_pag = iPageCurrent-2 if iPageCurrent+2 > iPageCount then fino_a_pag = iPageCount else fino_a_pag = iPageCurrent+2 else da_pag = 1 fino_a_pag = iPageCount end if%> <%for i = da_pag to fino_a_pag%> 'riga 160 <%if i = iPageCurrent then%> <font color="red"><%=i%></font> <%else%> <%=i%> <%end if%> <%next%> <%if iPageCurrent > 0 and iPageCurrent < iPageCount then%> [img]images/next.gif[/img] <%end if%> <%if iPageCurrent+1 < iPageCount then%> [img]images/last.gif[/img] <%end if%> ] </p> <div align="center"><p class="Stile1"> Pagina <%=iPageCurrent%> di <%=iPageCount%></p></div> <% end if conn.Close Set conn=Nothing %>

stex1984 
Rispondi quotando