<% if Request.Form("Buscarapida") <> "" Then Session("Buscarapida") = Replace(Request.form("Buscarapida"),"'","") sql = "select * from agenda where titulo like '%" sql = sql & Session("Buscarapida") sql = sql & "%' OR titulo like '%" sql = sql & Session("Buscarapida") sql = sql & "%' OR descricao like '%" sql = sql & Session("Buscarapida") sql = sql & "%' order by data" Else if sql = "" Then sql = "select * from agenda order by data" End if End if Session("sql") = sql %> <% Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 'If sql = "" Then ' Response.Redirect("busca_avancada.asp") 'End If Set Conn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.RecordSet") BdConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Domains\antonioautopecas.com.br\db\conteudo.mdb;" conn.Open BdConn RS.Open sql, Conn, adOpenKeyset, adLockReadOnly RS.PageSize = 2500 ScrollAction = Request("ScrollAction") if ScrollAction <> "" Then PageNo = mid(ScrollAction, 7) if PageNo < 1 Then PageNo = 1 end if else PageNo = 1 end if %>
Incluir agenda
Listagem
<% if RS.recordcount = 0 then %>

Desculpe, nenhum evento foi encontrado em sua busca.

<% End if %> <% if RS.recordcount <> 0 then %>

Foram encontrados <%= RS.Recordcount%> eventos em sua busca.

 

<% Do while not (RS is nothing) %> <% RowCount = rs.recordcount %> <%Do While Not RS.EOF and rowcount > 0 %>

<%=rs("data")%> -<%=rs("hora")%> / <%=rs("titulo")%>

">Edite

">Delete

<% RowCount = RowCount - 1 RS.MoveNext %> <% Novatabela = ((Rowcount/15) - Int(Rowcount/15)) if Novatabela = 0 Then %> <% End if Loop %> <% set rs = nothing Loop Conn.Close set Conn = nothing %>
<% end if %>