<% set conexao = server.CreateObject("adodb.connection") conexao.Open application("odbc") %> .... <% sql = "select * from agenda where status = 'A' order by data desc" set rsagenda = conexao.Execute(sql) while not rsagenda.eof %> <% rsagenda.movenext wend %>

<%=rsagenda("data")%> - <%=rsagenda("titulo")%>, <%=rsagenda("local")%> <%=mid(rsagenda("hora"),1,5)%>
<% set rsagenda = nothing set conexao = nothing %>