<% set Conn = Server.CreateObject("ADODB.Connection") Conn.open CDSN query = "SELECT data, descricao FROM Comunicados WHERE exibir<>0 ORDER BY data DESC" set RS = Conn.execute (query) %> Perfeita União
<% if RS.EOF then Response.write("

Não há Corrente ou Comunicado disponível.

") else while (not RS.EOF) %> <% data = PegaDoBD(RS("data")) %>
Evento:
<%= PegaDoBD(RS("descricao")) %>
Data:
<%= day(data) & "/" & month(data) & "/" & year(data) %>
<% RS.MoveNext if (not RS.EOF) then Response.write("
") wEnd end if %>
<% set RS = nothing Conn.close set Conn = nothing %>