
26/08/2004, 05:04
|
| | Fecha de Ingreso: abril-2004
Mensajes: 21
Antigüedad: 21 años, 1 mes Puntos: 0 | |
Por qué no funciona este codigo. ¿?¿?¿? t=request("t1")
dpto = request("dpto")
if dpto <> "" then
d = split(dpto,", ")
for i=0 To Ubound(d)
strdpto = strdpto & "dpto = " & d(I) & " or "
next
dpto1 = Len(strDpto)
strdpto = Left(strDpto,(dpto1-4))
sql="select * from noticia where dpto in(" & strDpto & ") AND titulo_entradilla like '%"&t&"%' order by posi "
end if
if dpto = "" then
sql="select * from noticia where dpto=1 and titulo_entradilla like '%"&t&"%' or dpto=2 and titulo_entradilla like '%"&t&"%' or dpto=3 and titulo_entradilla like '%"&t&"%' or dpto=4 and titulo_entradilla like '%"&t&"%' or dpto=5 and titulo_entradilla like '%"&t&"%' order by posi "
end if
rs.open sql, conn,1,3 El error que aparace es:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
/paginas/buscador2d.asp, line 92
Última edición por flautel; 26/08/2004 a las 05:27 |