Error con un codigo de buscador
Publicado por XëXî (8 intervenciones) el 13/03/2006 23:48:12
Muy buenas, les escribo por que llevo un par de dias peleandome a tope con un buscador que estoy haciendo en asp, pero este erre que erre que da errores...
Alguien le podria echar una ojeadilla al codigo, porfavor??
El codigo es el siguiente:
<!-- #include File="connexion.asp" -->
<html>
<head>
<title>Buscar dades</title>
</head>
<body bgcolor="#FFFFCC">
<p><font face="Tahoma" size="2">Resultats obtinguts amb: <strong><%=Request("Palabra") %></strong></font></p>
<p align="right"><a href="javascript:history.go(-1)"><< Endarrere</a> </p>
<%
Dim oDBCon,Tabla
Set oDBCon=Server.CreateObject("adodb.connection")
Set Tabla=Server.CreateObject("adodb.recordset")
oDBCon.ConnectionString = g_sDSN
Dim Temp
Temp="Select * From poliza Where UCase(tomador) like '%" & UCase(strpalabra) & "%'"
Tabla.Open Temp
If Tabla.BOF And Tabla.EOF Then
%>
<p><font face="Tahoma" size="2">No s'ha trobat res amb <strong><%=Request("palabra")%></strong>
a la base de dades</font></p>
<%
Else
%>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="100%" height="74" bordercolor="#C0C0C0">
<tr>
<td width="13%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus activitat</font></strong></p>
</td>
<td width="11%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus d'annex</font></strong></p>
</td>
<td width="10%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">caracteristiques</font></strong></p>
</td>
<td width="9%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus de llicencia</font></strong></p>
</td>
<td width="19%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">observacions</font></strong></p>
</td>
</td>
<td width="19%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">codi</font></strong></p>
</td>
<td width="3%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Url</font></strong></p>
</td>
</tr>
<% While Not Tabla.EOF%>
<tr>
<td width="13%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("nombreteleoperadora")%></font></td>
<td width="11%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("referencia")%></font></td>
<td width="10%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("numpoliza")%></font></td>
<td width="9%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("fechaefecto")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("tomador")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("dnitomador")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><a href="<%=Tabla.Fields("direccion")%>"><font face="Tahoma" size="2">Anar</font></a>
</tr>
<%
Tabla.MoveNext
Wend
Tabla.Close
Conexion.Close
End If
%>
</table>
</center></div>
<br>
<p align="right"><a href="javascript:history.go(-1)"><< Endarrere</a> </p>
<br>
</body>
</html>
ESPERO QUE PUEDAN AYUDAR-ME, YA QUE ME HES UN POQUILLO URGENTE... GRACIAS! ^^
Alguien le podria echar una ojeadilla al codigo, porfavor??
El codigo es el siguiente:
<!-- #include File="connexion.asp" -->
<html>
<head>
<title>Buscar dades</title>
</head>
<body bgcolor="#FFFFCC">
<p><font face="Tahoma" size="2">Resultats obtinguts amb: <strong><%=Request("Palabra") %></strong></font></p>
<p align="right"><a href="javascript:history.go(-1)"><< Endarrere</a> </p>
<%
Dim oDBCon,Tabla
Set oDBCon=Server.CreateObject("adodb.connection")
Set Tabla=Server.CreateObject("adodb.recordset")
oDBCon.ConnectionString = g_sDSN
Dim Temp
Temp="Select * From poliza Where UCase(tomador) like '%" & UCase(strpalabra) & "%'"
Tabla.Open Temp
If Tabla.BOF And Tabla.EOF Then
%>
<p><font face="Tahoma" size="2">No s'ha trobat res amb <strong><%=Request("palabra")%></strong>
a la base de dades</font></p>
<%
Else
%>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="100%" height="74" bordercolor="#C0C0C0">
<tr>
<td width="13%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus activitat</font></strong></p>
</td>
<td width="11%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus d'annex</font></strong></p>
</td>
<td width="10%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">caracteristiques</font></strong></p>
</td>
<td width="9%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">tipus de llicencia</font></strong></p>
</td>
<td width="19%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">observacions</font></strong></p>
</td>
</td>
<td width="19%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">codi</font></strong></p>
</td>
<td width="3%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Url</font></strong></p>
</td>
</tr>
<% While Not Tabla.EOF%>
<tr>
<td width="13%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("nombreteleoperadora")%></font></td>
<td width="11%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("referencia")%></font></td>
<td width="10%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("numpoliza")%></font></td>
<td width="9%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("fechaefecto")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("tomador")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("dnitomador")%></font></td>
<td width="16%" bgcolor="#FFCC00" height="51">
<p align="center"><a href="<%=Tabla.Fields("direccion")%>"><font face="Tahoma" size="2">Anar</font></a>
</tr>
<%
Tabla.MoveNext
Wend
Tabla.Close
Conexion.Close
End If
%>
</table>
</center></div>
<br>
<p align="right"><a href="javascript:history.go(-1)"><< Endarrere</a> </p>
<br>
</body>
</html>
ESPERO QUE PUEDAN AYUDAR-ME, YA QUE ME HES UN POQUILLO URGENTE... GRACIAS! ^^
Valora esta pregunta


0