modificato dacodice:<% Randomize() randNum = (CInt(1000 * Rnd) + 1) * -1 set conn = CreateObject("ADODB.Connection") sql = "SELECT TOP 10 Distinct comune, " & _ "r = Rnd(" & randNum & ")" & _ "FROM TableName " & _ "ORDER BY r" set rs = conn.execute(sql) response.write rs(0) ' ... rs.close: set rs = nothing conn.close: set conn = nothing %>
http://www.aspfaq.com/show.asp?id=2132

Rispondi quotando