Vorrei chiedere un piccolo aiuto ai guru dell'ASP... sto cercando di modificare delle pagine in ASP e non capisco come fare:
il cuore della questione è la seguente riga:
dove Counter è un campo in un file .mdb di tipo numerico, e produce correttamente la lista in ordine decrescente di Countercodice:sql = "SELECT * FROM tblDownloads Where Counter>0 ORDER BY Counter Desc"
Se invece volessi fare la lista in ordine decrescente del campo "Date" dove Date è una data (ovviamente) faccio
ma mi da errore !!! Qualcuno può aiutare questo grande ignorante??codice:sql = "SELECT * FROM tblDownloads Where Date>0 ORDER BY Date Desc"![]()
![]()
Ecco tutto il codice:
codice:<% Dim rsTop Set rsTop = Server.CreateObject("ADODB.Recordset") rsTop.pagesize = 10 rsTop.cachesize = 10 rsTop.CursorType = 0 rsTop.CursorLocation = 3 rsTop.LockType = 1 sql = "SELECT * FROM tblDownloads Where Counter>0 ORDER BY Counter Desc" rsTop.open sql, conn, 3, 3 %> <table width="100%" border="0"> <tr><td class="header" bgcolor="#FF9900" colspan="2">Classifica 10 Downloads</td></tr> <tr> <td bgcolor="#FFCC00">Titolo</td> <td bgcolor="#FFCC00"> <p align="right">Downloads</td> </tr> <% If Not RSTop.EOF Then Dim myRec For myRec=1 to rsTop.pagesize %> <tr> <td bgcolor="#FFCC00"> "><%= rsTop("FileName")%> </td> <td bgcolor="#FFCC00"> <p align="right"><%= rsTop("Counter")%></td> </tr> <% rsTop.MoveNext If rsTop.EOF Then Exit For Next 'Clean up memory rsTop.close set rsTop = nothing Conn.close set conn = nothing else response.write "<tr><td>No data found!</tr></td>" end if %>

) faccio
Rispondi quotando