<%
Dim buscar
buscar = Request.Form("buscar")
%>
BUSQUEDA ARAP
_________________________________________________________
<%
Function fBuscar(cnn)
Dim rs
Dim SQL
Dim str
SQL="SELECT Titulo, Comentarios, PALAC, Link FROM Busqueda WHERE PALAC LIKE '%"&buscar&"%';"
Set rs = CreateObject("ADODB.Recordset")
rs.ActiveConnection = cnn
rs.Open SQL
While Not rs.EOF
str = str & "" & rs("Titulo") & " >> " & "" & rs("Comentarios")& " "
rs.MoveNext
Wend
if str = "" then str ="Lo sentimos, no se encontraron resultados con esta palabra"
if buscar = "" then str ="Por favor, especifique su búsqueda"
fBuscar = str
End Function
Dim cnn
Dim str
Set cnn = CreateObject("ADODB.Connection")
str = "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("buscador.mdb")
cnn.Open str
Response.write " "
Response.write "RESULTADOS "
Response.write "DE LA BUSQUEDA"
Response.write " "
Response.write " "
Response.Write fBuscar(cnn)
Response.write " "
%>
|