Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2003, 12:06
ciberpata
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago de Compostela
Mensajes: 603
Antigüedad: 21 años, 11 meses
Puntos: 0
Ayuda Urgente por Presentación de web site mañana

Saludos al foro:
Tengo una pagina que se llama: "generartabla_ultima_hora.asp" que devuelve un listado de una db en forma de icono. Al pulsar sobre cada icono debe ir a la página web: "ficha_ultima_hora.asp" y visualizar una ficha con los datos de la oferta.
Es aquí donde me da el error siguiente:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][Controlador ODBC Microsoft Access] Error de sintaxis (falta operador) en la expresión de consulta 'id ='.

/ficha_hotel.asp, line 30

Os mando el codigo de las paginas por si veis el error:

codigo generartabla_ultima_hora.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

<SCRIPT LANGUAGE="JavaScript">
<!--
function AbrirVentana (theURL, winName, features)
{
window.open (theURL, winName, features);
}
-->
</SCRIPT>


</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<p>
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
'Set Ob_Conn= Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "DSN=clubviajesoferta.com.access"
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText
'Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%'Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
Set Ob_Conn = Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText
Ob_Command.CommandText= "SELECT * FROM ofertas WHERE fotoultimahora = '" & Request("fotoultimahora") & "'"%>
<%Set Ob_RS=Ob_Command.Execute ()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr bgcolor="#e0e0e0">
<td width="100%"><div align="left"><font size="2"><font size="1"><font size="1"><font face="Arial, Helvetica, sans-serif"></font></font></font></font></div></td>
</tr>
<% do until ob_RS.eof %>
<tr align="left" valign="top" bgcolor="#ebf3eb">
<td><font size="1" face="Arial, Helvetica, sans-serif"><a href="ofertas_ultima_hora.asp"

onClick="AbrirVentana('ficha_hotel.asp?fotoultimah ora=<%=Ob_RS("fotoultimahora")%>', '', 'top=112, left=165, width=627, height=350, resizable=0')" shape="rect" ><img src="images/<%=Ob_RS("fotoultimahora")%>" alt="Información de última hora" width="22" height="22" border="0"></a>
</font> </tr>
<% Ob_RS.movenext
loop
Ob_RS.close
Ob_Conn.close
%>
</table>
</body>
</html>
--------

codigo ficha_ultima_hora.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%response.Expires=0%>
<html>
<head>
<title>Informaci&oacute;n sobre el Hotel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body background="images/frame_izqda_con_opacidad.jpg" leftmargin="0" topmargin="25" marginwidth="0" marginheight="0">
<!--Incluimos el fichero de constantes-->
<!--#INCLUDE file="ADOVBS.inc"-->
<%
'Para conexión a dsn arsys con ACCESS
'Set Ob_Conn= Server.CreateObject("ADODB.Connection")
'Set Ob_Command= Server.CreateObject("ADODB.Command")
'Ob_Conn.open "DSN=clubviajesoferta.com.access"
'Ob_Command.ActiveConnection=Ob_Conn
'Ob_Command.CommandType=adCmdText%>
<%'Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")&>
'<%Set Ob_RS=Ob_Command.Execute ()
'Termina aquí la conexion a dsn arsys con ACCESS

'Para conexion a ODBC local
Set Ob_Conn = Server.CreateObject("ADODB.Connection")
Set Ob_Command= Server.CreateObject("ADODB.Command")
Ob_Conn.open "cvo_odbc"
' Abrimos la tabla, declaramos que conexión esta abierta, tipo de cursor, tipo de cerrojo, y opciones
Ob_Command.ActiveConnection=Ob_Conn
Ob_Command.CommandType=adCmdText
<%Ob_Command.CommandText= "Select * From ofertas WHERE fotoultimahora = " & Request.QueryString("fotoultimahora")%>
<%Set Ob_RS=Ob_Command.Execute () %>
<table width="100%" cellpadding="2">
<tr>
<td width="6%" align="left" valign="top"> <div align="left"><img src="images/<%=Ob_RS("fotoultimahora")%>" width="<%=Ob_RS("fotoultimahoraancho")%>" height="<%=Ob_RS("fotoultimahoraalto")%>" align="top"></div>
<div align="left"></div></td>
</tr>
</table>
</body>
</html>


Gracias a todos