
08/01/2006, 21:00
|
 | | | Fecha de Ingreso: diciembre-2005 Ubicación: frente al monitor
Mensajes: 398
Antigüedad: 19 años, 5 meses Puntos: 12 | |
buscar.asp <html>
<head>
<title>Buscar datos</title>
</head>
<body bgcolor="#FFFFCC">
<p><font face="Tahoma" size="2">Resultados obtenidos con <strong><%=Request("Palabra") %></strong></font></p> 'Iniciamos la conexión a la tabla
<%
Dim Conexion,Tabla
Set Conexion=Server.CreateObject("adodb.connection")
Set Tabla=Server.CreateObject("adodb.recordset")
Conexion.Open "Driver={Microsoft Access Driver (*.mdb)}; " & "Dbq=" & Server.MapPath("base.mdb")
Dim Temp
Temp="Select * From Tabla1 Where UCase(pal) like '%" & UCase(Request("palabra")) & "%'"
Tabla.Open Temp, Conexion
If Tabla.BOF And Tabla.EOF Then
%> 'Si la palabra no esta en el glosario enviamos el siguiente mensaje
<p><font face="Tahoma" size="2">No se ha encontrado nada con <strong>
<%=Request("palabra")%></strong> en la Base de Datos</font></p> 'Si se encuentra la palabra desplegamos los resultados en una tabla
<%
Else
%>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="100%" height="74" bordercolor="#C0C0C0">
<tr>
<td width="28%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Palabra</font></strong></p>
</td>
<td width="52%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Definición</font></strong>
</td>
</tr>
<% While Not Tabla.EOF%>
<tr>
<td width="28%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("Nombre")%></font></td>
<td width="28%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("Des")%></font></td>
</tr>
</table>
</center></div>
</body>
</html> |