ho trovato questo scritp in rete:
codice:<%@LANGUAGE = JScript%> <% var Cn = new ActiveXObject("ADODB.Connection"); var Sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("db.mdb"); Cn.Open(Sc); var Sql = "SELECT * FROM dati ORDER BY id DESC"; var Mostra = new ActiveXObject("ADODB.Recordset"); Mostra.Open(Sql,Cn,1); var pag = parseInt(Request.QueryString("id")); if (isNaN(pag) || pag < 1) pag = 1; if (!Mostra.EOF) { Mostra.PageSize = 10; Mostra.AbsolutePage = pag; } var i = 0; %> <html> <head> <title>Paginazione per grandi query</title> </head> <body> <%while (!Mostra.EOF && i<10) {%> <table width="100%" border="1"> <tr> <td><%=Mostra("campo")%></td> </tr> </table> <% i++; Mostra.MoveNext(); } %> <table width="100%"> <tr> <td width="50%"> <%if (pag > 1) {%>Precedenti<%}%> <%else {%>Precedenti<%}%> </td> <td width="50%" align="right"> <%if (!Mostra.EOF) {%>Successivi<%}%> <%else {%>Successivi<%}%> </td> </tr> </table> </body> </html> <%Cn.Close()%>
mi genera questo errore:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/include/inc_news.asp, line 2
var Cn = new ActiveXObject("ADODB.Connection");
e po di seguito altri..come mai?

Rispondi quotando
