Noticias Randomizadas
Olá, pessoal!
Estou tentando fazer este rondonize funcionar no BD/Access, mas nao esta funcionando.
Exibe a noticias mas nao alterna.
SEGUE ABAIXO O CODIGO NA INTEGRA. ALGUEM PUDER ME AJUDAR, FICAREI GRATO.
*****************
<%
Set Conn = Server.CreateObject("AdoDb.Connection")
Conn.provider="Microsoft.Jet.OLEDB.4.0"
Conn.connectionstring=Server.Mappath("bd/database.mdb")
Conn.open
SQL = "SELECT * FROM tbl_noticia"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.open SQL,Conn, 3, 3
Randomize
Numero = INT(RND * RS.RecordCount)
Randomize
SQL = "SELECT top 3 * FROM tbl_noticia WHERE 'id_noticia= & Numero &' order by id_noticia"
Set RS2 = Conn.execute(SQL)
if rs2.eof then
response.write "Notícias sempre atualizadas do setor"
else
%><b><%
response.write RS2("data") %>- </b><%
response.write left(RS2("titulo"),55) & "..."
End if
conn.close
Set conn=nothing
set rs=nothing
set rs2=nothing
%>
************
Discussão (1)
Carregando comentários...