codice:
sql = "SELECT DISTINCT ordine From ordini where username='"&username&"' and ordine<>0 order by ordine ASC" 
 set rs=conn.execute(sql)

 <%
 a=0
 
  do while not rs.eof
  %>
  <tr>
    <td width="13%" height="30" align="center"><%=rs("ordine")%></td>
    <td width="25%" height="30" align="center"><%=rs("datapost")%></td>
    <td width="13%" height="30" align="center"><%=rs("stato")%></td>
    <td width="18%" height="30" align="right"><%=rs("titolo")%></td>
    <td width="14%" height="30" align="right"></td>
  </tr>
  <%
  a=a+rs("prezzo")
  rs.movenext
  loop
   %>
Il codice sopra mi da il seguente errore:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/elenco-ordini.asp, line 90

io penso si tratti di un errore nell'uso del distinct, ma non riesco a risolverlo, qualcuno sa dirmi dove sbaglio?

Grazie