salut,
essaye ce code, il marche très bien. bon program...
axel
<%
Dim edito__MMColParam
edito__MMColParam = "1"
if (Request.QueryString("origine") <> "") then edito__MMColParam = Request.QueryString("origine")
%>
<table cellpadding="0" cellspacing="0" width="95%" align="center">
<tr>
<td width="100%" colspan="4" height="34" valign="top">
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0" align="center">
<%
if refquestion=0 then
'---------------sélection des messages correspondant au thème---------
Set CONN = Server.CreateObject("ADODB.Connection")
CONN.Open "DSN"
Set rs = Server.CreateObject("ADODB.Recordset")%>
<%
rs.open "select* from nom_de_la_table", CONN
if rs.eof=true then
%>
pas de message(s) correspondant(s)
<%else%>
<%
rs.movefirst
compteur=0
'-------------------------cette boucle comptabilise le nombre de messages pour le thème choisi-------------------
do while not rs.eof
compteur=compteur+1
rs.movenext
loop
%>
<%n=compteur%>
<%'-----------------------génération d'un nombre aléatoire sur le nombre de messages correspondants--------------
Randomize Timer
aleatoire=Int(Rnd * n)+1
%>
<%rang=0%>
<%rs.movefirst
'-------------------------cette boucle cherche le message correspondant au nombre tiré au hasard-----------------
do while not rs.eof%>
<%rang=rang+1%>
<%if rang=aleatoire then%>
<div align="center">
<table width="100%" border="0" cellspacing="0">
<tr>
<td>
<div align="center"><%=rs("champ1")%><br></div>
</td>
</tr>
</table>
<%end if%>
<%rs.movenext
loop%>
<%end if%>
<%
rs.close
Set rs=nothing
CONN.close
Set conn=nothing
%>
<%end if%>
</div>
</td>
</tr>
</table>
-------------------------------
Réponse au message :
-------------------------------
Salut !
Quel qu'un pourrait me donner un exemple ki marche utilisant la requette SQL
"SELECT RANDOM FROM table"
car cet exemple ne fonctionne pas

Merci par avance
@+
Fabs
