Cosa c'è di sbagliato in questo codice?
<%@LANGUAGE = JScript%>
<%
var Cn = new ActiveXObject("ADODB.Connection");
var Sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("/mdb-database/Libri.mdb");
Cn.Open(Sc);
var Sql = "SELECT * FROM libri";
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 = 5;
Mostra.AbsolutePage = pag;
}
var i = 0;
%>
<html>
<head>
<title>Paginazione</title>
</head>
<body>
<%while (!Mostra.EOF && i<5) {%>
<table width="100%" border="1">
<tr>
<td><%=Mostra("Autori")%></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()%>
In base a questo codice come posso mettere in ordine i risultati in base ad un campo e non in base all'id